SqlDataSourceStatusEventArgs.AffectedRows 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得資料庫操作影響的列數。
public:
property int AffectedRows { int get(); };
public int AffectedRows { get; }
member this.AffectedRows : int
Public ReadOnly Property AffectedRows As Integer
屬性值
資料庫操作所影響的列數。 預設值為 -1。
備註
所有操作都會回傳受影響的列數。 屬性AffectedRows的值與 、 Update及Insert方法的Delete回傳值相同。
當 Select 呼叫該方法且資料來源設為 DataReader 模式時,回傳值在所有情況下皆為 0。