Hello.
 
    I'm trying to use updatable ResultSet and I had two problems. I'm working with JDBC version 7.3.0.21a.
 
    This is the description step by step:
 
    1.- I create an Statement with
 
   stmt = database.Conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_SENSITIVE
   , java.sql.ResultSet.CONCUR_UPDATABLE);
 
    or

   stmt = database.Conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE
   , java.sql.ResultSet.CONCUR_UPDATABLE);
 
    2.- I execute the query and apparently everything goes right (the query includes all the fields of one table)
 
    3.- When I use .getType() it throws an exception.
 
    4.- getConcurrency() works OK.
 
    4.- I take all the rows in the table to fill a JTable with rs.next().
 
    5.- I move to a row with .absolute() and get the value of a column with getValueAt(). The value is the correct one.
 
    6.- When I execute updateString() on the same value I get the following Exception
 
    com.sap.dbtech.jdbc.exceptions.InternalJDBCError: [prepareHelper]SAP DBTech SQL: [-9005] System error: BD Illegal key
        at com.sap.dbtech.jdbc.UpdatableResultSetSapDB.prepareHelper(UpdatableResultSetSapDB.java:312)
        at com.sap.dbtech.jdbc.UpdatableResultSetSapDB.prepareUpdate(UpdatableResultSetSapDB.java:339)
        at com.sap.dbtech.jdbc.UpdatableResultSetSapDB.findUpdateColumn(UpdatableResultSetSapDB.java:163)
        at com.sap.dbtech.jdbc.UpdatableResultSetSapDB.updateString(UpdatableResultSetSapDB.java:1048)
        at containers.SQLExecuteTMListener.tableChanged(SQLExecuteTMListener.java:36)
    The table has a primary key with only one field, and has not foreign keys or indexes.
   
 
Regards
Blas Rodriguez Somoza

Reply via email to