Maybe your first insert is not correct, I refer to the syntax, I
recommended, that debug the insert, something like this:
// Form the qIns
String qIns = "insert into db (id,upline,pv,tgl_join,tgl_update)
values ('" + id + "','" + rs.getString("id") + "',18,'" +
getDateTime() + "','" + getDateTime() + "')";System.out.println(qIns); // Check your console, then, copy the qIns content (displayed in the console), then run it direct on mysql (maybe phpmyadmin, or mysql query browser, or direct in the console of mysql), now look the result of execute the qIns in mysql. I'm thinking you're checking your log, I do it to stay monitoring my code, I do this in a console of my linux;: tail -F /opt/tomcat6/logs/catalina.out Now, that you're checking the output console (log), you can check if there is a error of your first insert, and you will know the problem Good Luck.... On Oct 5, 1:35 am, Ferry Fernandez <[email protected]> wrote: > Hi, i have a problem with my SQL.Statement.executeUpdate. anybody can help me > please ? > My code shown below : > > String qIns = "insert into db > (id,upline,pv,tgl_join,tgl_update) values ('" + id + "','" + > rs.getString("id") + "',18,'" + getDateTime() + "','" + getDateTime() + "')"; > stm.executeUpdate(qIns); > > String qUpt = "update db SET lc='"+id+"' where id='" + > rs.getString("id") + "'"; > stm.executeUpdate(qUpt); > > the question is, why only one executeUpdate done, the other one not done? > need to refresh the first statement before the second one? > > Tq advance.. > > Best Regards, > > Ferry Fernandez SKom. MM. > Goodhealth Management Team > --------------------------------------------------- > PT. Good Health Product Indonesia Business Park Kebon Jeruk A-6 > Jl. Meruya Ilir No. 88, Jakarta Barat-Indonesia HP 0811 89 3632 -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
