Visual Basic: RDO Data Control
RowsAffected Property
Returns the number of rows affected by the most recently invoked Execute method.
Syntax
object**.RowsAffected**
The object placeholder represents an object expression that evaluates to an object in the Applies To list.
Return Values
The RowsAffected property return value is a Long value ranging from 0 to the number of rows affected by the most recently invoked Execute method on either an rdoConnection or rdoQuery object.
Remarks
RowsAffected contains the number of rows deleted, updated, or inserted when running an action query. When you use the Execute method to run an rdoQuery, the RowsAffected property setting is the number of rows affected. For example, when you execute a query that deletes 50 rows from a table, the RowsAffected property returns 50.
This property is especially useful when you need to determine how many rows were affected in an action query with an ambiguous WHERE clause. For example, in a query that deletes all rows where the Price column is greater than 10, the RowsAffected property would indicate how many rows actually qualified and were deleted.