Q
Problem solve Get help with specific problems with your technologies, process and projects.

Knowing when a row is locked by another user

In Visual Basic/Oracle, can I test the return code from a "select for update"? I would like to know when the row is locked by another user.

Write a SELECT ..... FOR UPDATE NOWAIT SQL statement. If the row is locked, you will get an "ORA-0054 ERROR: resource is busy" error message. If no error is given, then you are locking the record. After the update, you must release locks by COMMITTING the changes.

For More Information


Dig Deeper on Oracle and SQL

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close