Sign in Join
FPDoc Onlineexperiment

TSQLScript class

In unit SQLDB

Component to execute various SQL statements.

Declaration

pascal
TSQLScript = class(TCustomSQLscript)

Inheritance

  1. TSQLScript
  2. TCustomSQLscript

Description

TSQLScript is a component that can be used to execute many SQL statements using a TSQLQuery component. The SQL statements are specified in a script Script separated by a terminator character (typically a semicolon (;)).

See also

Properties

AbortedpublicTrue when the script was aborted.
LinepublicCurrent line of execution in the script.
DataBasepublishedDatabase on which to execute the script.
TransactionpublishedTransaction to use in the script.
AutoCommitpublishedAutomatically commit every statement.
UseDollarStringpublishedEnable support for dollarstrings.
DollarStringspublishedList of alternate string delimiter token sequences.
DirectivespublishedList of directives.
DefinespublishedDefined macros.
ScriptpublishedThe script to execute.
TerminatorpublishedTerminator character.
CommentsinSQLpublishedShould comments be passed to the SQL engine ?
UseSetTermpublishedShould the SET TERM directive be recognized.
UseCommitpublishedControl automatic handling of the COMMIT command.
UseDefinespublishedAutomatically handle pre-processor defines.

Methods

ExecuteStatementprotected
ExecuteDirectiveprotected
ExecuteCommitprotected
SetDatabaseprotected
SetTransactionprotected
CheckDatabaseprotected
CreateQueryprotected
CreatepublicCreate a new TSQLScript instance.
DestroypublicRemove the TSQLScript instance from memory.
ExecutepublicExecute the script.
ExecuteScriptpublicConvenience function, simply calls Execute.

Events

OnDirectivepublishedEvent handler if a directive is encountered.
OnExceptionpublishedException handling event.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.