Data.SqlExpr.TCustomSQLDataSet.RowsAffected

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property RowsAffected: Integer read GetRowsAffected;

C++

__property int RowsAffected = {read=GetRowsAffected, nodefault};

Properties

Type Visibility Source Unit Parent
property protected
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TCustomSQLDataSet

Description

Indicates the number of rows operated on by the latest query execution.

When the SQL dataset represents a query that does not return a result set, you can't use the RecordCount property to ascertain the number of records affected by the query. In such cases, read RowsAffected to determine how many rows were updated or deleted by the query when it executed. If no rows were updated or deleted, RowsAffected is zero. RowsAffected is –1 if the SQL statement could not be executed due to an error condition. (This latter situation typically follows the throwing of an exception.)

See Also