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

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.

.NET Framework Security

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Platforms

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Compact Framework

Supported in: 2.0, 1.0

See Also

Reference

SqlCeDataReader Class
SqlCeDataReader Members
System.Data.SqlServerCe Namespace