SQL_GetNumRows()

Examples


The SQL_GetNumRows() function returns the number of rows that were affected by a write operation for the specified pass-through SQL connection.

Syntax

SQL_GetNumRows(SQL_connection, num_rows)

Parameters

SQL_connection – A long integer specifying the pass-through SQL connection to use.

num_rows – A returned long integer containing the number of rows that were affected by a write operation.

Return value

A long integer indicating whether the operation was successful. The value 0 indicates that the number of rows affected was successfully retrieved. Any other value indicates an error occurred.

Comments

The SQL_GetNumRows() function does not return the number of rows in a results set.

For this function to properly return the number of rows affected, the “nocount” flag must be turned off for the pass-through SQL connection. You can turn this flag off by executing the following SQL statement:

set nocount off

After you have finished executing SQL statements and using the SQL_GetNumRows() function to find out how many rows were affected, be sure to set the “nocount” flag to on. Do this using the following SQL statement:

set nocount on

This is the state that Dexterity expects the pass-through SQL connection to be in.


Documentation Feedback