SqlHasRetStat%

Determines whether a stored procedure or a remote stored procedure generated a return status number.

Syntax

SqlHasRetStat% ( sqlconn% )

where

sqlconn%
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Returns

SUCCEED (1) or FAIL (0).

Remarks

Status numbers are returned only by stored procedures running on SQL Server version 4.2 or later.

The server returns stored procedure information (including any return status and parameter values) immediately after returning all normal results for that stored procedure. Process the normal results, and then call SqlHasRetStat% after SqlResults% returns NOMORERPCRESULTS (for all stored procedures in a batch except the last one) or NOMORERESULTS (for a single stored procedure, or for the last stored procedure in a batch).

SqlRetStatus& actually retrieves the status number. Stored procedures that complete normally return a status number of 0.

The order in which the application processes the status number and any return parameter values is unimportant.

See Also

SqlNextRow%, SqlResults%, SqlRetData$, SqlRetStatus&