Invalid Cursor State (cursor for update statement)
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Invalid Cursor State (cursor for update statement)

  1. #1
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    The following embedded SQL comes back with an
    "Invalid cursor state" on the UPDATE statement.
    What could it be?

    EXEC SQL DECLARE cur1 CURSOR FOR
    SELECT col1 FROM table1 FOR UPDATE OF col1
    END-EXEC

    EXEC SQL OPEN cur1 END-EXEC

    EXEC SQL FETCH cur1 INTO :ws-col1 END-EXEC

    EXEC SQL
    UPDATE table1 SET col1 = 'The rain in spain'
    WHERE CURRENT OF cur1
    END-EXEC

    EXEC COMMIT END-EXEC
    EXEC SQL CLOSE cur1 END-EXEC


    **** other info
    Oracle 9i, Microfocus COBOL
    Don't blame me, I'm from Red Sox Nation.

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Moving it from administration to development as it was the most appropriate forum for these questions.


    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width