|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
calling stored procedure in Sybase 12.5 |
« View previous topic :: View next topic » |
Author |
Message
|
saini |
Posted: Fri Sep 16, 2005 8:06 am Post subject: calling stored procedure in Sybase 12.5 |
|
|
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 |
|
 |
mgk |
Posted: Fri Sep 16, 2005 11:54 am Post subject: |
|
|
 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 |
|
 |
saini |
Posted: Fri Sep 16, 2005 12:30 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|