View previous topic :: View next topic |
Author |
Message |
pradeepg Beginner
Joined: 06 Jan 2003 Posts: 25 Topics: 12 Location: Columbus, OH
|
Posted: Mon Feb 24, 2003 11:57 am Post subject: Resultset and Output parameters of a DB2 SP |
|
|
Hi,
I am facing a probelm with DB2 SP's while calling it from (ASP pages or C++ components). I have defined my DB2 SP with one I/P and 2 O/P parameters. I will move SQLCODE to one of my Out Parameters and error message to other output parameter. When I am trying to display it in ASP page always these 2 parameters are showing zero and spaces respectively. This is happening only if I have RETURN CURSOR statement in my SP. Is it some thing to do with RESULTSET = 1definition so that we can only send Resultset to front end not the output parameteres, OR is it some mistake I am doing in front end programming. Same SP when I am executing from DB2 main driver proram then it is displaying the output parameters whatever I have populated in my SP.
Please share your thoughts.
Thanks,
Pradeep |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Feb 26, 2003 4:25 pm Post subject: |
|
|
I have been waiting for a reply on this issue as I am having a similar problem. I am using a Visual Basic front end accessing an SP on the mainframe. When I return a resultset, I cannot access any output parameters. I ended up passing back any SQL Errors as a resultset and having the front end application check the fields being returned to determine if an error occurred. |
|
Back to top |
|
|
pradeepg1 Beginner
Joined: 06 Jan 2003 Posts: 20 Topics: 7 Location: Columbus, OH
|
Posted: Thu Feb 27, 2003 4:28 pm Post subject: |
|
|
At last we found the answer after doing lot of research on this.
In order to see the values in output parameters we need to close or destroy the recordset before accessing the output parameters.
say
SET RECORDSET = NOTHING
Hope this woud help you.
Folks are not responding as they use to. Please help other by responding immly. I am sure somebody must have faced the same problem and they also must have got the answer. Any how Thank God ! |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Feb 28, 2003 11:37 am Post subject: |
|
|
Pradeepq1,
I tried your solution and it worked great. Thanx. |
|
Back to top |
|
|
|
|