Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011
    Posts
    1

    Lightbulb Unanswered: Procedure failing with "SQL0435N An invalid application defined SQLSTATE " " was

    I have been working on resolving the error "SQL0435N An invalid application defined SQLSTATE " " was specified" for quite some time.

    Here is what is happening...
    I have a parent procedure that loops around a variable, and this variables is the input parameter to the child procedure.

    I have tested the child procedure with the same parameter that the looping variable is assigned. And it works absolutely fine.

    However when the same is being run in the cursor it fails with the error highlighted in the top.

    Can anyone suggest/advice what could be the cause of this issue.

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Check all your SIGNAL statements - I guess you have an exception handler that tries to signal an SQLSTATE that does not follow the rules.

    SQL0435N An invalid application defined SQLSTATE "<sqlstate>" was
    specified.

    Explanation:

    The SQLSTATE value specified by the RAISE_ERROR function or on the
    SIGNAL or RESIGNAL statement does not conform to the rules for an
    application defined SQLSTATE.

    User response:

    Correct the specified value for the SQLSTATE. The SQLSTATE value must be
    a character string containing exactly 5 characters. It must be of type
    CHAR defined with a length of 5, or type VARCHAR defined with a length
    of 5 or greater. The SQLSTATE value must follow the rules for
    application-defined SQLSTATEs.

    The following are the rules for an SQLSTATE value specified on the
    SIGNAL or RESIGNAL statement.
    * Each character must be from the set of digits ('0' through '9') or
    non-accented upper case letters ('A' through 'Z').
    * The SQLSTATE class (first two characters) cannot be '00'.

    The following are the rules for an SQLSTATE value specified by the
    RAISE_ERROR function
    * Each character must be from the set of digits ('0' through '9') or
    non-accented upper case letters ('A' through 'Z')
    * The SQLSTATE class (first two characters) cannot be '00', '01', or
    '02' since these are not error classes.
    * If the SQLSTATE class (first two characters) starts with the
    character '0' through '6' or 'A' through 'H', then the subclass (last
    three characters) must start with a character in the range 'I'
    through 'Z'
    * If the SQLSTATE class (first two characters) starts with the
    character '7', '8', '9' or 'I' though 'Z', then the subclass (last
    three characters) can be any of '0' through '9' or 'A' through 'Z'.

    sqlcode: -435

    sqlstate: 428B3

Posting Permissions

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