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 stored procedure in Sybase 12.5

Post new topic  Reply to topic
 calling stored procedure in Sybase 12.5 « View previous topic :: View next topic » 
Author Message
saini
PostPosted: Fri Sep 16, 2005 8:06 am    Post subject: calling stored procedure in Sybase 12.5 Reply with quote

Novice

Joined: 28 Feb 2002
Posts: 24

I am having trouble calling an external database stored procedure which resides in Sybase 12.5. I m using MB version 5 with CSD5 on Windows 2000 server machine.

The DB stored procedure has 3 parameters and they are defined as :
@SUBID char(9) out
@SubDate char( in
@outText char(253) out

and my ESQL procedure is defined as
CREATE PROCEDURE spDataSelect( INOUT SubId CHARACTER,
IN subDate CHARACTER, INOUT outString CHARACTER
) EXTERNAL NAME "dbo.spDataSelect";


I don't see any errors on deployment however, when I run a transaction through I get the following error in the eventlog (event viewer):

( Broker2.default ) The procedure 'dbo.spDataSelect' with '3' parameters could not be matched with a corresponding Database stored procedure.

Stored Procedures must match the ESQL CREATE PROCEDURE definition in the following ways: 1: The ESQL parameters must all be of SCALAR type. 2: The directions of each ESQL and Database parameter (IN / OUT / INOUT) must match. 3: The number of parameters in both the ESQL and database definitions must match.

Ensure these conditions are met and redeploy the message flow.


Any ideas to what I am doing wrong? Any help much appreciated.

Thanks,
NS
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Sep 16, 2005 11:54 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

I thought that the error message looked pretty clear . All parameters and directions must match in both the ESQL and in the DB definition of the stored procedure (SP). Assuming you posted your actual SP definition, your SP signature is OUT, IN, OUT but your ESQL shows INOUT, IN INOUT. You need to change the ESQL (or the DB stored procedure - whichever you consider the easiest) to be the same. In this case, as your SP signature is shown as OUT, IN OUT then your ESQL also has to be OUT, IN OUT in terms of the parameter directions.

Regards,


MGK
_________________
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
saini
PostPosted: Fri Sep 16, 2005 12:30 pm    Post subject: Reply with quote

Novice

Joined: 28 Feb 2002
Posts: 24

Thanks for the quick reply.

Yes, actually I did want them INOUT since I was also passing some values into the stored procedure. I couldn't however, figure out how to specify an INOUT for the stored procedure in SYBASE.

So, I created a new parameter for OUT and another one for IN.

It is working now.

Thanks for your help.
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 stored procedure in Sybase 12.5
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.