IBDAC

TCustomDASQL.RowsAffected Property

Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.

Class

TCustomDASQL

Syntax

property RowsAffected: integer;

Remarks

Check RowsAffected to determine how many rows were inserted, updated, or deleted during the last query operation. If RowsAffected is -1, the query has not inserted, updated, or deleted any rows.

Example

For correct initializing this property you should explicitly prepare SQL as it is shown in the example below.

IBCSQL.SQL.Text := 'Update Employee set salary = :sal where emp_no = :no';
IBCSQL.Prepare;
IBCSQL.Execute;
AffRows := IBSQL.RowsAffected;
IBCSQL.Unprepare; 
© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback