SqlDataSourceStatusEventArgs.AffectedRows 屬性

定義

取得資料庫作業所影響的資料列數目。

public:
 property int AffectedRows { int get(); };
public int AffectedRows { get; }
member this.AffectedRows : int
Public ReadOnly Property AffectedRows As Integer

屬性值

Int32

資料庫作業所影響的資料列數目。 預設值為 -1。

備註

所有作業都會傳回作業所影響的資料列數目。 屬性 AffectedRows 的值與 、 InsertDelete 方法的 Update 傳回值相同。

Select呼叫 方法且資料來源設定為 DataReader 模式時,所有情況下傳回值為 0。

適用於

另請參閱