Posted: Thu Oct 04, 2007 5:35 am Post subject: WBIMB Support for SQL Server stored procedures
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
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[]);
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