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 Row locking using oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Row locking using oracle database