| Author |
Mysql support rollback or not
|
Syed Saifuddin
Ranch Hand
Joined: Sep 01, 2003
Posts: 129
|
|
Hello I am using type 4 driver name ConnectorJ with file mysql-connector-java-3.1.0-alpha-bin.jar. My code is /********************************************/ Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost/hrms?user=root"); con.setAutoCommit(false); System.out.println("commit = "+con.getAutoCommit()); /**********************************************/ After this I have 7 PreparedStatement and then a condition for commit or rollback but rollback doesn't work. If any other driver works fine at your end please tell me the name of driver . Thankyou
|
Thank You & Best Regards,
Syed Saifuddin,
Senior Software Engineer
SAP Oracle AIX & Java Training
http://www.socialinet.com
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
This will depend more on whether the DB engine you are using supports transactions or not. The default in MySQL I think is ISAM (correct mme if I'm wrong) which doesn't support transactions, and you'll need InnoDB which does.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Mysql support rollback or not
|
|
|