Forums Register Login

Java ResultSet

+Pie Number of slices to send: Send
I have tried the following piece of code to view the resultSet in an Access database.

Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet res = stmt.executeQuery("select * from tableName);
//code to change one columd in the table....
res.UpdateString(/*column name*/);
res.updateRow();

The resultSet gets updated but it also displays the changes made to the database from another transaction. When i use TYPE_SROLL_INSENSITIVE and CONCUR_READ_ONLY, it works fine and does not display any changes.What am i doing wrong?

Thanks
Divya
+Pie Number of slices to send: Send
Please do not post the same question in multiple forums. We all read multiple forums so you are not going to increase your audience. The multiple posts can also cause confusion and duplication of effort as we try to help everyone.
crispy bacon. crispy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 836 times.
Similar Threads
problem with resultset in web service method
problem with sql statement in my setValueAt method
how to set property of jdbc?
SQLException problem?
problem with ResultSet.CONCUR_UPDATABLE
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:38:27.