ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportStored procedure returning null in ESQL

Post new topicReply to topic
Stored procedure returning null in ESQL View previous topic :: View next topic
Author Message
Saloni
PostPosted: Tue Jun 17, 2014 9:29 pm Post subject: Stored procedure returning null in ESQL Reply with quote

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
View user's profile Send private message
AkankshA
PostPosted: Tue Jun 17, 2014 11:29 pm Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Saloni
PostPosted: Thu Jun 19, 2014 4:17 am Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportStored procedure returning null in ESQL
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.