Home > Archive > PostgreSQL JDBC > July 2005 > JDBCRowSet in tableModel setValueAt method









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author JDBCRowSet in tableModel setValueAt method
Dennis Gesker

2005-07-22, 8:24 pm

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(columnInde
x + 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


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com