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 » Stored Procedure in MS SQL Sever

Post new topic  Reply to topic
 Stored Procedure in MS SQL Sever « View previous topic :: View next topic » 
Author Message
RichA
PostPosted: Mon Jan 26, 2004 8:03 am    Post subject: Stored Procedure in MS SQL Sever Reply with quote

Centurion

Joined: 14 Mar 2002
Posts: 102

I've been having trouble calling a stored procedure in SQL server, Ive tried using a passthru such as -

SET OutputRoot.Result[] = PASSTHRU('EXEC/CALL inputvalidate ?,?,?', InputRoot.A, InputRoot.B, InputRoot.C)

This fails because A,B & C are long character variables (100+K) and using SQL profiler it appears only the first 16 characters of each variable are getting passed.

I've also tried -

DECLARE err CHARACTER;
CALL inputvalidate(InputBody.BatchId);
CREATE PROCEDURE inputvalidate ( IN batchID INT, OUT err CHAR ) EXTERNAL NAME "inputvalidate" ;

This fails because -
DatabaseException BIP2324E: Unsupported datatype '-9' fetched from database table column 'PROCEDURE_CAT'.

Which method should I be using, will either work properly?

I have just noticed the SQL Profiler is reporting the call as -
exec sp_stored_procedures N'dreaminputvalidate', N'dbo', NULL
despite the fact InputBody.BatchId is populated in this case with the integer 3.
Back to top
View user's profile Send private message MSN Messenger
mgk
PostPosted: Tue Jan 27, 2004 3:26 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

We do not support CREATE PROCEDURE with SQLServer, so that is why that is not working.

We also do not support OUT parameters with stored procedures called via PASSTHRU, so make sure you are not doing that. We also do not support the returning of a single scalar value in any form of Stored Procedure (stored function really) so ensure this is not the case.

If you are only passing IN parameters to your SP, try it with something simple (lile hard-coded small strings < 16 chars) to verify that is is being called properly. Then (assuming that you can call it ok) increase the string length untill you hit your problem.

Somethings to think about:

*Does your string have embedded NULLs?

*What datatype are the procedure's parameters defined to be at the SQLServer end (CHAR, CLOB, VARCHAR etc?)

*Look at an ODBC trace to see what the call we make to SQLDescribeParam and SQLBindParameters are returning, and taking, to make sure they are sensible.

If all this fails, you should raise a PMR.

Cheers,
_________________
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
RichA
PostPosted: Wed Jan 28, 2004 2:01 pm    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2002
Posts: 102

Thanks, I was trying to use both of these unsupported techniques at various times, I did try to call the stored procedure with hard coded strings > 16 characters, which from what the SQL profiler was reporting to me was only receiving the first 16 characters, I'm not sure if this is something to do with what the SQL profiler telling me not being the whole truth or not as I'm no SQL Server expert, it's just how it appears to me.

To resolve the problem I'm now calling the stored procedure with an integer and putting the results into a table for the flow to pick up afterwards. This at first glance appears to work.

At least now I know that these methods are not supported and it's not something I can do anything about makes me feel a bit better.
Back to top
View user's profile Send private message MSN Messenger
MQ_LEO
PostPosted: Thu Jan 04, 2007 3:25 pm    Post subject: WMB V6.0 supports SQL Stored Procedure Reply with quote

Apprentice

Joined: 06 Jul 2006
Posts: 29

Hai every body.
My code is
CALL SCHEDULED_HEARING(Environment.ResultSet1[]);

CREATE PROCEDURE SCHEDULED_HEARING()
LANGUAGE DATABASE
DYNAMIC RESULT SETS 1
EXTERNAL NAME "dbo.SCHEDULED_HEARING";


but it not givving any data from database. please let me know WMB V6.0 supports SQL stored procedures.or not

My database ---- Microsoft SQLServer.
Thanks,
MQ_LEO
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 » Stored Procedure in MS SQL Sever
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.