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 Index » WebSphere Message Broker (ACE) Support » Invoking Stored Procedure using ESQL

Post new topic  Reply to topic
 Invoking Stored Procedure using ESQL « View previous topic :: View next topic » 
Author Message
djs
PostPosted: Fri May 02, 2014 12:00 pm    Post subject: Invoking Stored Procedure using ESQL Reply with quote

Newbie

Joined: 25 Mar 2014
Posts: 5

I am attempting in invoke a SQL stored procedure that has a required input string. I am not getting any results back or any database connection errors. I have tested and confirmed that the stored proc does return a record when executed in SQL Explorer. I have used similar code to invoke stored procedures that have integer parameters without issue in a different subflow of the same application. I’m not sure why this is not returning any results. Any suggestions?

Code:
DECLARE luCheckOrder SHARED ROW;

CREATE PROCEDURE GetByOrderNumber ( IN P1 CHARACTER )
LANGUAGE DATABASE
DYNAMIC RESULT SETS 1
EXTERNAL NAME "dbo.usp_GetOrder";

CREATE PROCEDURE GetOrderDetails (IN orderNum CHARACTER, OUT acctNum CHARACTER, OUT routingNum CHARACTER)
BEGIN
   
   DECLARE checkOrder REFERENCE TO luCheckOrder.top;
   IF NOT LASTMOVE(checkOrder) THEN
     CREATE LASTCHILD OF luCheckOrder NAME 'top';
     MOVE checkOrder TO luCheckOrder.top;
   END IF;
         
   CALL GetByOrderNumber(‘12345’,luCheckOrder.top[]);

END;
Back to top
View user's profile Send private message
Dave Ziegler
PostPosted: Fri May 02, 2014 1:42 pm    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

Important safety tip: if your data exists in environment A and you're selecting in environment B, you will not get the desired results
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 02, 2014 7:29 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Invoking Stored Procedure using 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.