File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Making Updates to Updatable Result Sets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Making Updates to Updatable Result Sets " Watch "Making Updates to Updatable Result Sets " New topic
Author

Making Updates to Updatable Result Sets

Tim Connor
Greenhorn

Joined: Jun 12, 2002
Posts: 1
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

Joined: Oct 11, 2000
Posts: 1112

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Making Updates to Updatable Result Sets
 
Similar Threads
Use a ResultSet twice
Date not fully replaced by Calendar?
Passing a recordset to a class
Retrieving and displaying ResultSet in JSP
Accessing Return Code Closes RecordSet?