TSQLConnection.ExecuteDirect procedure
Execute a piece of SQL code directly, using a Transaction if specified.
Declaration
procedure ExecuteDirect(SQL: string); virtual; overload
procedure ExecuteDirect(SQL: string; ATransaction: TSQLTransaction)
; virtual; overloadArguments
SQL | SQL statement to be executed. |
ATransaction | Transaction to be used. The default transaction will be used if none is passed. |
Description
ExecuteDirect executes an SQL statement directly. If
ATransaction is
Nil then the default transaction is
used, otherwise the specified transaction is used.
ExecuteDirect does not offer support for parameters, so only
statements that do not need parsing and parameters substitution can be handled.
If parameter substitution is required, use a
TSQLQuery
component and its
ExecSQL method.
Errors
If no transaction is assigned, and no transaction is passed, an exception will be raised.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
