Syntax
SQLRetrieveRows(ConnectNum)
Remarks
Determines the number of rows available in the data source. To use SQLRetrieveRows, a macro must have already established a connection using SQLOpen. Also, a query must have already been executed using SQLExecQuery, and results must be pending.
Argument | Explanation |
ConnectNum | The unique connection ID for a data source. If ConnectNum is not valid, SQLExecQuery would have returned an error value. In such a case, SQLRetrieveRows places error information in memory for the error functions, if such information is available. |
Returns the number of rows in the data source. Note that the row count is one-based; that is, the first row is 1, not 0 (zero).
SQLRetrieveRows returns 0 (zero) if used to determine the number of rows in the query result of a SQLQueryExec instruction.
If there are no results pending on the connection, no data was found, or there is no data, SQLRetrieveRows returns –1 (SQL_NoMoreData).