Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    35

    Unanswered: SQL0514N The cursor "<name>" is not in a prepared state

    In our application based on j2ee db2 v 7.2 eee we have begun getting the following error. I went to message reference to the description of this error and found the following but couldnt correlate it.The statement is a select stmt and the data is taken by a java hashmap and painted on the screen. What may be the reason?


    SQL0514N The cursor "<name>" is not in a prepared state.


    Explanation: The application program tried to use a cursor "<name>" that is not in a prepared state. The cursor is associated with a statement that either (1) was never prepared, (2) was made not valid by a ROLLBACK, or (3) was made not valid by either an explicit or implicit rebind of the package.

    The statement cannot be processed.

    User Response: For case (1), prepare the statement named in the DECLARE CURSOR statement for "<name>" before you try to open the cursor. For case (2), do not issue a ROLLBACK until after you finish using the cursor. For case (3), the prepare for the cursor must be reissued.

    sqlcode: -514

    sqlstate: 26501

  2. #2
    Join Date
    Feb 2004
    Posts
    24

    Re: SQL0514N The cursor "<name>" is not in a prepared state

    Originally posted by manish21
    Hi

    can u please post ur statement ! What are u using native jdbc, precompiled sqlj, etc. ?

    regards

    Marc Gaines

    In our application based on j2ee db2 v 7.2 eee we have begun getting the following error. I went to message reference to the description of this error and found the following but couldnt correlate it.The statement is a select stmt and the data is taken by a java hashmap and painted on the screen. What may be the reason?


    SQL0514N The cursor "<name>" is not in a prepared state.


    Explanation: The application program tried to use a cursor "<name>" that is not in a prepared state. The cursor is associated with a statement that either (1) was never prepared, (2) was made not valid by a ROLLBACK, or (3) was made not valid by either an explicit or implicit rebind of the package.

    The statement cannot be processed.

    User Response: For case (1), prepare the statement named in the DECLARE CURSOR statement for "<name>" before you try to open the cursor. For case (2), do not issue a ROLLBACK until after you finish using the cursor. For case (3), the prepare for the cursor must be reissued.

    sqlcode: -514

    sqlstate: 26501

  3. #3
    Join Date
    Jan 2003
    Posts
    35

    Re: SQL0514N The cursor "<name>" is not in a prepared state

    we are using native jdbc type-4 in our application

Posting Permissions

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