I have connected NetBeans IDE with MS Access and while doing a transaction I got this error. It seems that savepoints are not supported...Please guide me..
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:cse");
Statement stmt1, stmt2, stmt3;
System.out.println("Statements created");
conn.setAutoCommit(false);
String query1 = " update registration set id='105' " +
"where first = 'Sumit' ";
String query2 = " update registration set id='106' " +
"where first = 'Zayed' ";
System.out.println(" Queries created");
stmt1 = conn.createStatement();
System.out.println(" Connection created");
Savepoint s1 = conn.setSavepoint("sp1");
System.out.println(" Savept created");
stmt2 = conn.createStatement();
stmt1.executeUpdate(query1);
stmt2.executeUpdate(query2);
conn.commit();
stmt3 = conn.createStatement();
stmt1.close();
stmt2.close();
conn.releaseSavepoint(s1);
conn.close();
The error is Statements created Queries created Connection created Error: java.lang.UnsupportedOperationException