• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java ResultSet  RSS feed

 
Divya Kamath
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!