View previous topic :: View next topic
|
Author |
Message |
rashmirgowda
New User
Joined: 18 Jun 2008 Posts: 25 Location: india
|
|
|
|
Hi,
i am using stored procedure in my main module. Main module is calling stored procedure1 and from stored procedure1 its calling stored procedure2.
Stored procedure2 is working fine and return the correct result to stored procedure1 with sqlcode of 450.
Main module --> Sp1 ---> Sp2
Please anyone guide me regarding the same. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
What do you not understand from the SLQCODE -450 Description? |
|
Back to top |
|
|
rashmirgowda
New User
Joined: 18 Jun 2008 Posts: 25 Location: india
|
|
|
|
i Understood that it was some access problem. Please let me know if you have any idea. |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
My DB2 manual lookup service:
Code: |
-450 USER-DEFINED FUNCTION OR STORED PROCEDURE name, PARAMETER NUMBER
parmnum, OVERLAYED STORAGE BEYOND ITS DECLARED LENGTH.
Explanation: Upon return from a specific function name or a stored
procedure name, DB2 has detected an overlay storage beyond a parameter's
declared length. The parameter number is specified for a stored procedure
or function. This is not permitted.
|
It is not an access problem. I suggest you check passed parameters to the stored procedures. One or more may be longer than the length declared in the stored procedure. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I hope you realize that SQLCODE you get was "- 450" and not "450 (without negative sign, as you post in your original post)".
- 450 means -- you've a mismatch in the parameter's declared length and to quote the manual:
Quote: |
Upon return from a specific function name or a stored procedure name, DB2 has detected an overlay storage beyond a parameter's declared length. The parameter number is specified for a stored procedure or function. This is not permitted. |
|
|
Back to top |
|
|
rashmirgowda
New User
Joined: 18 Jun 2008 Posts: 25 Location: india
|
|
|
|
Hi,
i have checked the parameter length. both are same.
Input to storeprocedure1 and output to the stored procedure2 are having same length.
please assist on the same. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
You should be making a CALL to DSNTIAR to expand the SQLCA
WHEN EVER YOU ENCOUNTER A NEGATIVE SQLCODE
which will expand your SQLCA contents and provide you with neat bits of info.
Quote: |
i have checked the parameter length. both are same. |
well excuse me, DB2 must be wrong! |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
rashmirgowda wrote: |
Hi,
i have checked the parameter length. both are same.
Input to storeprocedure1 and output to the stored procedure2 are having same length.
please assist on the same. |
But what perhaps is more interesting, what is the lenght of the actual data passed to stored procedure 1 from your application? Does it exceed the defined parameter lenghts? |
|
Back to top |
|
|
rashmirgowda
New User
Joined: 18 Jun 2008 Posts: 25 Location: india
|
|
|
|
Hi,
From appliaction to stored procedure1 the length of input is 43, output is 66 and inout is 38.
for stored procedure the length of input is 46, output is 3 and inout is 38. |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
You are only looking at the definitions, but what are the length of the actual data supplied when you get the error? |
|
Back to top |
|
|
rashmirgowda
New User
Joined: 18 Jun 2008 Posts: 25 Location: india
|
|
|
|
Hi,
The same length was used and got the error as 450. |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
OK, if you can't provide further details on the error, this is the end of my help, sorry.
But do try to retrieve the SQLCA information, as dbz suggested above. It will at least tell you what parameter overflowed and in which procedure. |
|
Back to top |
|
|
|