QUESTION POSED ON: 11 August 2003
I am working as an Oracle/VB programmer.
I am trying to lock a record using "FOR UPDATE NOWAIT" statement.
For example, when I open a recordset with
select * from emp where empno =1 for update nowait
I get the error:
ORA-01002: fetch out of sequence
This statement works fine if the record is already locked by some other user through other sessions.
When the record is not locked, the above statement should lock the record. In this case it's giving the error.
Please help me find the solution.
|