Прочетете на английски Редактиране

Споделяне чрез


SqlDataSourceStatusEventArgs.AffectedRows Property

Definition

Gets the number of rows affected by a database operation.

C#
public int AffectedRows { get; }

Property Value

The number of rows affected by a database operation. The default value is -1.

Remarks

All operations return the number of rows affected by the operation. The AffectedRows property has the same value as the return value of the Update, Insert, and Delete methods.

When the Select method is called and the data source is set to DataReader mode, the return value is 0 in all cases.

Applies to

Продукт Версии
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also