Solution to problem is to use sql:
Example:
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_state");
while (rs.next()) {
System.out.print(rs.getString(1));
System.out.print(" ");
System.out.println(rs.getString(2));
}
Statement s2 = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
s2.executeUpdate("insert into erp_state (state) values ('New State')");
rs.refreshRow();
rs.last();
System.out.println("New row ");
System.out.print(rs.getString(1));
System.out.print(" ");
System.out.println(rs.getString(2));
} catch (SQLException e) {
System.out.println(e.getMessage());
}
}
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general