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 » Calling a StoredProc in ESQL

Post new topic  Reply to topic
 Calling a StoredProc in ESQL « View previous topic :: View next topic » 
Author Message
bhupa_sri
PostPosted: Thu Sep 22, 2005 7:33 am    Post subject: Calling a StoredProc in ESQL Reply with quote

Apprentice

Joined: 30 Dec 2004
Posts: 30
Location: India

Hi all,

Is it possible to call a storedprocedure (written in SQL) in ESQL code.

The follwing way i coded ESQL:

CREATE COMPUTE MODULE CallStoreProc_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
DECLARE sno INT;
SET sno = 3;
CALL Test(sno)EXTERNAL SCHEMA 'schema';
-- CALL CopyEntireMessage();
RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE Test(IN parm1 INT) EXTERNAL NAME student;

END MODULE;

i am using the following Environment:

windows 2000 Professional
SQL 2000 SP3. Driver 3.60
WBIMB 5.0 with fixpack 4.

Thanks in Advance..
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Sep 22, 2005 8:16 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Stored Procedures on SQL Server invoked using CALL are only supported on (I think) fix pack six and above on V5. And when you are on fix pack six you do not need to use the EXTERNAL SCHEMA clause to call them unless you are using a '%' as the schema name on the EXTERNAL NAME clause.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
bhupa_sri
PostPosted: Thu Sep 22, 2005 8:30 am    Post subject: Reply with quote

Apprentice

Joined: 30 Dec 2004
Posts: 30
Location: India

Stored procedures in SQLServer are not supported.
It is given in WBIMB Help, If any chance please let me know other than fixpack6
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Sep 22, 2005 9:17 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

That is what I tried to say. SQL Server stored procedures are only supported from V5 fixpack 6 onwards.

So if you move to fix pack 6 then they will work.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Sep 22, 2005 9:26 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

If you do not want to move to fix pack six then you can use PASSTHRU to call a stored procedure in SQL Server, but that will only allow IN parameters.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
bhupa_sri
PostPosted: Thu Sep 22, 2005 9:44 am    Post subject: Reply with quote

Apprentice

Joined: 30 Dec 2004
Posts: 30
Location: India

Thanks for your valuable suggestion..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling a StoredProc 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.