Skip to content

TCustomSQLQuery.RowsAffected

Return the number of rows (records) affected by the last DML/DDL statement.

Declaration

Source position: sqldb.pp line 608

public 
function TCustomSQLQuery.RowsAffected : TRowsCount;  virtual;

Description

RowsAffected returns the number of rows affected by the last statement executed using ExecSQL.

Errors

If the connection or database type does not support returning this number, -1 is returned. If the query is not connected to a database, -1 is returned.

See also

Name Description
TCustomSQLQuery.ExecSQL Execute a SQL statement that does not return a result set.
TSQLConnection An abstract class representing a connection to a SQL Database.