This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Row locking using oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Row locking using oracle database" Watch "Row locking using oracle database" New topic
Author

Row locking using oracle database

kwwong wong
Ranch Hand

Joined: Feb 15, 2002
Posts: 56
I have a problem on record locking using JDBC. My application have a JTable to show the records of the table in Oracle DB. User can select the row in the table and the form is shown to display the detail of the record. Before the form is display, I am using the statement SELECT * FROM TABLE_NAME WHERE ID = ? FOR UPDATE NOWAIT to lock the record. The problem is when one user lock the record, another user also cannot lock other record. It seen that the whole table is locked by the first user. Why ? In my knownledg, the select for update statement only lock the selected record. Other rows can be update by other people.
Have any suggestion? Thanks
 
jQuery in Action, 2nd edition
 
subject: Row locking using oracle database