Hi,
Im currently developing a web application that utilizes Java and DB2 on as/400. The problem is when i used batch transaction in updating,inserting or deleting data , consider the code below:
String sSQL = "INSERT INTO tblTest VALUES(?,?)"
try{
con.setAutoCommit(false);
PreparedStatement pstmt = con.prepareStatement(sSQL);
pstmt.setInt(1,123456);
pstmt.setString(1,"Jimbo");
pstmt.addBatch();
pstmt.setInt(1,234567);
pstmt.setString(1,"Stifler");
pstmt.addBatch();
pstmt.executeBatch();
con.setAutoCommit(true);
} catch (SQLException e) {
try{
con.rollback();
} catch (SQLException e2) {
}
}
when executed it gives "The table tblTest is not valid for operation ". Does the driver im using doesnt support transaction?
Thx,
Marlon Cenita