i need to make an insert into a mysql db from my application
i modified the ApplicationAdapter class added this code:
public boolean insert(String a, String b){
             Connection conn1 = null;
                           try{
                            String userName ="xxxx";
                            String password = "xxxx";
                            String url =
"jdbc:mysql://172.22.1.4:3306/xxxx";
                            Class.forName ("com.mysql.jdbc.Driver
").newInstance();
                            conn1 = DriverManager.getConnection (url,
userName, password);

                 //    System.out.println ("Database connection
established");
                 }
               catch (Exception e){
               System.err.println ("Cannot connect to database server");
                                 }

                      finally{
                         try{
                         if (conn1 != null){
                         Statement statement = conn1.createStatement();
                         statement.executeUpdate("INSERT INTO user_webcam "
+ "VALUES (a, b)");
                        //  conn1.close();
                          }
                           }
                        catch (Exception e) {
                        // ignore close error

                               }
                           }
                 return true;
                                            }
and calling the method from client side with nc.call("insert", nc, value a,
value b);
the method returns true to the client, but the mysql query does not execute.

a similar mysql insert code running standalone worked ok
thanks a lot
mauricio
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to