Answer: How to get number of rows updated in by an sql statement? (Win32::ODBC)
Q&A > database programming > How to get number of rows updated in by an sql statement? (Win32::ODBC) - Answer contributed by Anonymous Monk
For UPDATE, INSERT, and DELETE statements the returned value is the number of rows affected by the request or -1 if the number of affected rows is not available.
Note: This function is not supported by all ODBC drivers! Some drivers do support this but not for all statements (eg. it is supported for UPDATE, INSERT and DELETE commands but not for the SELECT command).
Note: Many data sources cannot return the number of rows in a result set before fetching them; for maximum interoperability, applications should not rely on this behavior.
Number of affected rows or -1 if not supported by driver in the current context.