RAD Studio VCL Reference
|
Gets the number of rows changed, inserted, or deleted by execution of SQL statement.
property RecordsAffected: Integer;
__property int RecordsAffected;
The RecordsAffected property contains the number of rows changed, inserted, or deleted by SQL statements. It contains zero (0) if no rows were affected or the statement failed, and -1 for SELECT statements. The RecordsAffected property is not set until all rows are read and you close the TAdoDbxDataReader. The value of this property is cumulative. For example, if two records are inserted in batch mode, the value of RecordsAffected is two.
The IsClosed and RecordsAffected properties are the only ones that you can call after the TAdoDbxDataReader is closed.
Returns |
When |
0 |
No rows were affected or the statement failed. |
-1 |
A SELECT statement executed. |
Other numbers |
The number of rows affected. The value is cumulative and reflects actual records affected by batch mode operations. |
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|