SQLRowCount

If this function is called after the cursor has been opened and the cursor is of type Keyset or Static, the SQLRowCount function returns the number of rows in the results set. For Dynamic cursors, SQLRowCount always returns –1. If the keyset is being populated asynchronously (please refer to the SQL Server documentation on sp_configure) SQLRowCount will return –1 until the keyset is fully populated.

The SQLRowCount function returns the number of rows that are affected by an UPDATE, INSERT, or DELETE statement or by the SQL_UPDATE, SQL_ADD, or SQL_DELETE operations in SQLSetPos. SQLRowCount can be called after a database update has been performed.