|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Stored procedure returning null in ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
Saloni |
Posted: Tue Jun 17, 2014 9:29 pm Post subject: Stored procedure returning null in ESQL |
|
|
Newbie
Joined: 17 Jun 2014 Posts: 2
|
Hi,
I have written an ESQL code to call stored procedure existing in SQL server. Executing the procedure via query analyzer returns me a proper response - XML data within a column.
I am executing the procedure in the code using PASSTHRU. But I am not getting anything in the result. I tried setting the result in Environment variable, but the variable got deleted which shows PATHRU is returning null.
I tried both of the below statement -
SET Environment.Variable.DBData = PASSTHRU(' Proc1 123')
SET Environment.Variable.DBData[] = PASSTHRU(' Proc1 123') where Proc1 is the procedure name and 123 is the hardcoded input argument.
Can anybody please help analyzing why am I getting null. |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Jun 17, 2014 11:29 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
From the infocenter
Quote: |
The main use of the PASSTHRU statement is to issue administrative commands to databases (for example, to create a table).
Note: Do not use PASSTHRU to call stored procedures; instead, use the CALL statement because PASSTHRU imposes limitations (you cannot use output parameters, for example). |
So I would convert your PASSTHRU to a CALL, and declare the procedure you're trying to call. |
|
Back to top |
|
 |
Saloni |
Posted: Thu Jun 19, 2014 4:17 am Post subject: |
|
|
Newbie
Joined: 17 Jun 2014 Posts: 2
|
I have already tried with Call Procedure.
CALL Proc1 (SkuList, Environment.Variables.DBData[]);
CREATE PROCEDURE Proc1 (IN SkuList CHARACTER)
LANGUAGE DATABASE
DYNAMIC RESULT SETS 1
EXTERNAL NAME "XXX.XXXXXXXX";
Same result.  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|