Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL SQL program unit will not compile with FOR UPDATE NOWAIT cursor

chriskMar 2 2009 — edited Mar 2 2009
All,

I'm trying to use a FOR UPDATE NOWAIT cursor to avoid hung sessions on the front end form.

I'm using syntax like:

CURSOR my_cur (p_val)
IS
SELECT 1
FROM my_table
WHERE my_col = p_val
FOR UPDATE NOWAIT ;

However, later on in the procedure, when I try to reference this cursor with the following syntax:
(after opening/fetching the cursor...)

UPDATE my_table
SET my_col2 = :MY_BLOCK.FOO
WHERE CURRENT OF my_cur;

I get the following compilation error:
Error 404 at line 140, column 30
cursor 'MY_CUR' must be declared with FOR UPDATE to use with CURRENT OF

The peculiar thing is if I remove the "NOWAIT" keyword, the program unit compiles fine.

Has anything else noticed this? Any workaround or fixes? Is this a known bug?

Thanks a lot,
-Chris
This post has been answered by Andreas Weiden on Mar 2 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2009
Added on Mar 2 2009
2 comments
656 views