Page 1 of 1

TMSStoredProc return value is stored where?

Posted: Fri 20 Jan 2006 17:53
by Ken McClain
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

Posted: Fri 20 Jan 2006 18:13
by jfpicard
It's in @Return_value instead of @Result.

Posted: Tue 24 Jan 2006 07:35
by Ikar
Check RETURN_VALUE parameter to get result of stored procedure execution.