Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 1 (10.1) Part Number B10119-01 |
|
Applies To
Description
This method returns the number of rows that were processed by the last call to ExecuteSQL.
Usage
long GetRowsProcessed(void) const
Remarks
This call is only valid following a call to ExecuteSQL. Furthermore, the result is only valid if the SQL statement was an insert, delete, or update. Although you can use ExecuteSQL to run a select statement, you cannot use GetRowsProcessed to obtain the record count. This is because ExecuteSQL only executes the SQL statement, but does not fetch any rows. Thus there will always be zero rows processed following ExecuteSQL for a select statement.
Return Value
The number of rows processed by the last call to ExecuteSQL. If the SQL statement was not Data Manipulation (for example update, insert, or delete), GetRowsProcessed returns 0. If there has been no previous call to ExecuteSQL, the return value is -1.