Freigeben über


SqlCeDataReader.RecordsAffected Property

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

Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)

Syntax

'Declaration
Public Overrides ReadOnly Property RecordsAffected As Integer
'Usage
Dim instance As SqlCeDataReader
Dim value As Integer

value = instance.RecordsAffected
public override int RecordsAffected { get; }
public:
virtual property int RecordsAffected {
    int get () override;
}
/** @property */
public int get_RecordsAffected ()
public override function get RecordsAffected () : int
Not applicable.

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.

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.

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

.NET Compact Framework

Supported in: 2.0, 1.0

See Also

Reference

SqlCeDataReader Class
SqlCeDataReader Members
System.Data.SqlServerCe Namespace