If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Procedure failing with "SQL0435N An invalid application defined SQLSTATE " " was

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-11, 14:04
viper_1982 viper_1982 is offline
Registered User
 
Join Date: Nov 2011
Posts: 1
Lightbulb 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
Reply With Quote
  #2 (permalink)  
Old 11-09-11, 14:45
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Check all your SIGNAL statements - I guess you have an exception handler that tries to signal an SQLSTATE that does not follow the rules.

Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On