This documentation is archived and is not being maintained.

SqlCeDataReader.RecordsAffected Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

[Visual Basic]
Public Overridable ReadOnly Property RecordsAffected As Integer  _
   Implements IDataReader.RecordsAffected
public virtual int RecordsAffected {get;}
public: __property virtual int get_RecordsAffected();
public function get RecordsAffected() : int;

Property Value

The number of rows changed, inserted, or deleted; 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 SqlCeDataReader.

IsClosed and RecordsAffected are the only properties that you can call after the SqlCeDataReader is closed.


Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

SqlCeDataReader Class | SqlCeDataReader Members | System.Data.SqlServerCe Namespace