Share via


WstDataReader.RecordsAffected Property

[This is internal Microsoft documentation - Do not distribute.]

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

Namespace: Microsoft.Webstore.WstClient
Assembly: ICL (in icl.dll)

Syntax

'Declaration

  Public ReadOnly Property RecordsAffected As Integer
  public int RecordsAffected { get; }

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 SqlDataReader. The value of this property is cumulative. For example, if two records are inserted in batch mode, the value of RecordsAffected will be two. IsClosed and RecordsAffected are the only properties that you can call after the SqlDataReader is closed.

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

WstDataReader Class
WstDataReader Members
Microsoft.Webstore.WstClient Namespace