Thread: JDBCRowSet in tableModel setValueAt method
Hello All:
I've been attempting to build a tableModel for a swing JTable. I have been able to populate my jtable using a rowset. However, I seem to be running into a strange problem changing data in my JdbcRowSet.
In my implementation of setValueAt() I've added the following code surrounded by a try/catch.
rowSet.absolute(rowIndex + 1);
rowSet.setObject(columnIndex + 1, value);
fireTableCellUpdated(rowIndex, columnIndex);
I've imported com.sun.rowset.JdbcRowSetImpl only because I didn't see a JdbcRowSetImpl in the 8.0-311 JDBC3 driver.
If there is a JdbcRowSetImpl in the driver could someone point it out to me.
The data isn't updated and no error is returned from the program when I try to change a value in the JTable. I've confirmed that the setValueAt method is being called using a println statments.
I could really use a pointer/clue....
If anyone could help or perhaps share a working example of a tablemodel I'd be very greatful.
Cordially,
Dennis
I've been attempting to build a tableModel for a swing JTable. I have been able to populate my jtable using a rowset. However, I seem to be running into a strange problem changing data in my JdbcRowSet.
In my implementation of setValueAt() I've added the following code surrounded by a try/catch.
rowSet.absolute(rowIndex + 1);
rowSet.setObject(columnIndex + 1, value);
fireTableCellUpdated(rowIndex, columnIndex);
I've imported com.sun.rowset.JdbcRowSetImpl only because I didn't see a JdbcRowSetImpl in the 8.0-311 JDBC3 driver.
If there is a JdbcRowSetImpl in the driver could someone point it out to me.
The data isn't updated and no error is returned from the program when I try to change a value in the JTable. I've confirmed that the setValueAt method is being called using a println statments.
I could really use a pointer/clue....
If anyone could help or perhaps share a working example of a tablemodel I'd be very greatful.
Cordially,
Dennis