Delen via


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
[C#]
public virtual int RecordsAffected {get;}
[C++]
public: __property virtual int get_RecordsAffected();
[JScript]
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.

Implements

IDataReader.RecordsAffected

Remarks

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.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

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

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.