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 » WBIMB Support for SQL Server stored procedures

Post new topic  Reply to topic
 WBIMB Support for SQL Server stored procedures « View previous topic :: View next topic » 
Author Message
fel1xs
PostPosted: Thu Oct 04, 2007 5:35 am    Post subject: WBIMB Support for SQL Server stored procedures Reply with quote

Newbie

Joined: 27 Jun 2007
Posts: 2
Location: Salisbury, England

Hello
Can someone please claify what support there is within WBIMB V6 for returning data from SQL Server stored procedures?

According to a MSDN article there are four ways that this can be done:
    Output params which can either return data (int or char) or a cursor variable (cursors are result sets that can be retrieved one row at a time)

    return codes (these are always integers)

    a result set for each select in the SP (or any other SPs called)

    a global cursor that can be referenced outside the SP


Looking at the WBIMB documentation it clearly supports output params but does it support any of the others (e.g. result sets)? I'm trying to invoke a stored procedure which is returning a result set but I can't seem to be able to access this data. I'm suggesting to the DB developer that he needs to change the Stored Proc to use output parameters.

I've seen an example in the manual as follows:
CALL myProc1() INTO cursor;

but it doesn't specify what 'cursor' is. When I try to save this esql I get this error in the 'Toolkit'
'The called procedure must return a result'

The SP is as follows:
CREATE PROCEDURE [dbo].[usp_GetSchemesReadyForGladis]
AS
SET NOCOUNT ON

SELECT Scennumber
FROM Scenario
WHERE ScenGenerateGladisSchNo <> 0
GO
Thanks Sean
Back to top
View user's profile Send private message
fel1xs
PostPosted: Thu Oct 04, 2007 7:44 am    Post subject: Reply with quote

Newbie

Joined: 27 Jun 2007
Posts: 2
Location: Salisbury, England

Sorry ignore this question.
I got the broker to work with the result set as follows:
-- Create Procedure
CREATE PROCEDURE myproc1()
LANGUAGE DATABASE
DYNAMIC RESULT SETS 1
EXTERNAL NAME "dbo.usp_GetSchemesReadyForGladis";

-- Call invocation within the ESQL file
CALL myproc1(Environment.ResultSet1[]);

Thanks Sean
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 » WBIMB Support for SQL Server 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.