DbDataReader.RecordsAffected Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
public:
abstract property int RecordsAffected { int get(); };
public abstract int RecordsAffected { get; }
member this.RecordsAffected : int
Public MustOverride ReadOnly Property RecordsAffected As Integer
Property Value
The number of rows changed, inserted, or deleted. -1 for SELECT statements; 0 if no rows were affected or the statement failed.
Implements
Remarks
The RecordsAffected
property is not set until all rows are read and you close the DataReader
.
Notes to Implementers
This property and IsClosed should be implemented to return a value when the reader is closed.