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 database stored procedures

Post new topic  Reply to topic
 calling database stored procedures « View previous topic :: View next topic » 
Author Message
javaforvivek
PostPosted: Mon Jul 26, 2004 6:56 am    Post subject: calling database stored procedures Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Hi,
I am working on WBIBM5.0 CSD 3 level.
Is there any other way to call the database stored procedures apart from using 'passthru' statements?
My backend is SQLServer 2000. Currently I am using
Code:

PASSTHRU('exec stored_proc(...)');

_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kirani
PostPosted: Mon Jul 26, 2004 7:58 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Take a look at CREATE PROCEDURE ... statement.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
javaforvivek
PostPosted: Mon Jul 26, 2004 8:34 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

If I have a stored procedure as:
Code:

proc_LogDetails(  ( @batch_id       integer   = null,
     @event_code     char(10)  = null
   )

In my SQLServer,
then I have written code (in ESQL) as:
Code:

create procedure (IN batchId integer, IN eventCode character)
begin
CALL proc_LogDetails batchId,eventCode;


Code:

But this gives me error: Routine
'proc_LogDetails' is not declared for these arguments

what is worng in this code?
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
jefflowrey
PostPosted: Mon Jul 26, 2004 8:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I don't think you can call SQLServer stored procedures using Create Procedure.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Mon Jul 26, 2004 8:49 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Jeff,
So i have to use PASSTHRU statement, huh? PASSTHRU is working fine here.
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kirani
PostPosted: Tue Jul 27, 2004 4:16 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Your ESQL code is not correct. You need to use EXTERNAL keyword to specify that it's an external DB procedure. At least I did not see it documented anywhere that you cannot call a stored procedure in SQL Server. Take a look at WBIMB documentation for some sample code.


Code:

CALL swapParms( inputParm, outputParm, inputOutputParm );

CREATE PROCEDURE swapParms (
  IN parm1 CHARACTER,
  OUT parm2  CHARACTER,
  INOUT parm3 CHARACTER
) EXTERNAL NAME dbSwapParms;

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » calling database stored procedures
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.