• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Making Updates to Updatable Result Sets

 
Tim Connor
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This board has been very helpful in the passed, usually a good search and I find my answer, so this is my first post.

Is there a way to determine if (or a way to set) a scrollable cursor so that is locks the record if one is found as as a "Select for Update" statement.

Reading the JDBC API Tutorial and Reference (ResultSet chapter) it wasn't clear if ResultSet.CONCUR_UPDATABLE can be set to do a write-lock or if it is p to DB on how they want to implement the ResultSet. I am using Oracle 9.2.

Hope this is clear.. Thanks Tim
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
I'm quite sure that row locking would depend on the database and JDBC driver you are using. I know that Oracle's locking behaviour is different to Informix's (for example).

I believe you will find the answer to your question in the Oracle documentation, which is available from:

http://tahiti.oracle.com

I believe that the "Concepts Guide" will explain Oracle's locking mechanisms (and behaviour), while the "JDBC Developer's Guide and Reference" will tell you if you can create an updatable "ResultSet" using the "SELECT ... FOR UPDATE" statement.

Good Luck,
Avi.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic