.NET Framework 4.6 and 4.5
Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public MustOverride ReadOnly Property RecordsAffected As Integer
Type: System.Int32The number of rows changed, inserted, or deleted. -1 for SELECT statements; 0 if no rows were affected or the statement failed.
The RecordsAffected property is not set until all rows are read and you close the DataReader. Notes to Inheritors
This property and IsClosed should be implemented to return a value when the reader is closed.
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
Supported in: 3.0, 2.0, 1.0