ResultSet changes lost after changing cursor position

Hi -

The rowUpdated method seems to always return false

even after applying valid updates to a resultset object.

The database row can be updated with the changes immediately

but if i don't update before moving to a different row in the cursor

the changes to that row in the resultset are lost when i attempt to

retrieve them at a later time

Any ideas?

[403 byte] By [jpachman] at [2007-9-27 20:12:47]
# 1

Hi,

The rowUpdated method only returns true if the line was updated *and* the driver supports this feature. To find out if it does, call DatabaseMetaData.updatesAreDetected(int type). If it doesn't then that is your answer.

If you don't update a row before moving to another one it's somewhat obvious that the driver won't keep track of your changes (imagine what would happen if you do this for ecery row in a huge result set). The idea is to update the database. Otherwise they are lost. So just update the row if you want to, or do not make any changes to the columns if you don't.

Alin.

Ace169 at 2007-7-7 0:21:21 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...