In Java code, a sql string generated dynamically in code like:
String sqlstring ="Update tab1 set .... update tab2 set ....."
When execute the sqlstirng using prepareStatement and executeUpdate, JDBC driver 2.0 treat this execution as two transactions. It means Auto Commit = ture.
But I want to the sqlstring execution is treated as one transaction without code changs. I think there should be a setting for this issue but I am not sure where to set it. In JDBC conncetion string? in Database ?
When using SQL server 2000 with JDBC 1.0, the sqlstring execution is treated as on transaction. When move the database to SQL server 2008 instance and using JDBC 2.0, it seems not working any more.
Help please.
String sqlstring ="Update tab1 set .... update tab2 set ....."
When execute the sqlstirng using prepareStatement and executeUpdate, JDBC driver 2.0 treat this execution as two transactions. It means Auto Commit = ture.
But I want to the sqlstring execution is treated as one transaction without code changs. I think there should be a setting for this issue but I am not sure where to set it. In JDBC conncetion string? in Database ?
When using SQL server 2000 with JDBC 1.0, the sqlstring execution is treated as on transaction. When move the database to SQL server 2008 instance and using JDBC 2.0, it seems not working any more.
Help please.