Setting autoCommit to false not working with Primavera SDK
Hi,
I'm using the following JAVA code to insert some resources:
------------------------------------------------------------------------------------------------------------------------------
.......
Connection con = null;
Statement stmt = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:P6SDKODBC","admin","admin");
con.setAutoCommit(false);
stmt = con.createStatement();
stmt.executeUpdate("INSERT INTO RSRC (rsrc_id) VALUES (0)");
.......
con.commit();
------------------------------------------------------------------------------------------------------------------------------
However, the record is inserted into the database even before the con.commit() is called.
Thanks for your help,
Praveen.
I'm using the following JAVA code to insert some resources:
------------------------------------------------------------------------------------------------------------------------------
.......
Connection con = null;
Statement stmt = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:P6SDKODBC","admin","admin");
con.setAutoCommit(false);
stmt = con.createStatement();
stmt.executeUpdate("INSERT INTO RSRC (rsrc_id) VALUES (0)");
.......
con.commit();
------------------------------------------------------------------------------------------------------------------------------
However, the record is inserted into the database even before the con.commit() is called.
Thanks for your help,
Praveen.
0