import java.sql.*;
public class Main {
public static void main(String[] args) {
try {
Class.forName("com.sap.dbtech.jdbc.DriverSapDB");
} catch (ClassNotFoundException e) {};
Connection c;
try {
c =
DriverManager.getConnection(
"jdbc:sapdb://localhost/ERP_DEV",
"dba",
"dba");
Statement s = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = s.executeQuery("select * from erp_stock");
rs.moveToInsertRow();
rs.updateInt(1, 0);
rs.updateString(2, "new value");
rs.updateNull(3);
rs.updateNull(4);
rs.updateNull(5);
rs.insertRow();
rs.moveToCurrentRow(); // Here is the problem
} catch (SQLException e) {
System.out.println(e.getMessage());
}
}
}
Error code: SAP DBTech JDBC: Result set is not updatable.
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general