TMSStoredProc return value is stored where?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ken McClain
Posts: 12
Joined: Fri 20 Jan 2006 17:44

TMSStoredProc return value is stored where?

Post by Ken McClain » Fri 20 Jan 2006 17:53

I'm new with SDAC so be patient....
I have a number of SQL Stored Procedure with arguments that work fine with TMSStoredProc. However I'm a little confused as to where the return value of a SQL Function is stored. For example I can issue a T-SQL command like:
SELECT @rtn = usp_GetRowCount('tablename')

With TMSStoredProc I do this:
SP := TMSStoredProc.Create(nil)
SP.Connection := Conn (assume it was initialized)
SP.StoredProcName = 'usp_GetRowCount;1';
SP.Params.ParamValues['Table'] := 'tablename';
SP.FetchAllRows := TRUE;
SP.Execute;

Where do I find the return value.

Thanks

jfpicard
Posts: 24
Joined: Tue 06 Dec 2005 21:17

Post by jfpicard » Fri 20 Jan 2006 18:13

It's in @Return_value instead of @Result.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 24 Jan 2006 07:35

Check RETURN_VALUE parameter to get result of stored procedure execution.

Post Reply