SqlRows%

Indicates whether the current statement returned rows.

Syntax

SqlRows% ( sqlconn% )

where

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

Returns

SUCCEED (1) or FAIL (0).

Remarks

Call SqlRows% after SqlResults% returns SUCCEED and before you call SqlNextRow%; otherwise, SqlRows% returns an incorrect value. You can use SqlCmdRow% to determine whether the current statement is one that can return rows (that is, whether it is a Transact-SQL SELECT statement or a Transact-SQL EXECUTE statement executing a stored procedure containing a SELECT statement).

Even if SqlRows% returns FAIL, you must still process the results by calling SqlNextRow% until it returns NOMOREROWS.

See Also

SqlCmdRow%, SqlNextRow%, SqlResults%, SqlRowType%