I use the following code:
DECLARE curItem CURSOR FOR SELECT MH_Desc FROM Item FOR UPDATE
OPEN curItem
FETCH NEXT FROM curItem
WHILE (@@FETCH_STATUS=0)
BEGIN
... etc ...
and when I run it, I am told:
Server: Msg 16929, Level 16, State 6, Line 7
The cursor is READ ONLY.
The error seems to relate to a line where I am trying to update an entry using "... WHERE CURRENT OF ..." and I understand my cursor is ReadOnly - however I have specifically stated it to be updatable - what am I missing? How can I check to make sure my cursor is updatable?
DECLARE curItem CURSOR FOR SELECT MH_Desc FROM Item FOR UPDATE
OPEN curItem
FETCH NEXT FROM curItem
WHILE (@@FETCH_STATUS=0)
BEGIN
... etc ...
and when I run it, I am told:
Server: Msg 16929, Level 16, State 6, Line 7
The cursor is READ ONLY.
The error seems to relate to a line where I am trying to update an entry using "... WHERE CURRENT OF ..." and I understand my cursor is ReadOnly - however I have specifically stated it to be updatable - what am I missing? How can I check to make sure my cursor is updatable?