Unit 'msqldb' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#msegui]

tmsesqlscript

[Properties (by Name)] [Methods (by Name)]

Executes each statement of SQL (split on term) in turn

Declaration

Source position: msqldb.pas line 586

type tmsesqlscript = class(tcustomsqlstatement)

public

  constructor create(); override;

  property statementnr: Integer; [r]

  property statementcount: Integer; [r]

published

  property term: msechar; [rw]

  property charescapement: Boolean; [rw]

  property onbeforestatement: msesqlscripteventty; [rw]

  property onafterstatement: msesqlscripteventty; [rw]

  property params: tmseparams;

  property sql: tsqlstringlist;

  property database: tcustomsqlconnection;

  property transaction: TSQLTransaction;

  property options: sqlstatementoptionsty;

  property onbeforeexecute: sqlstatementeventty;

  property onafterexecute: sqlstatementeventty;

  property onerror: sqlstatementerroreventty;

end;

Inheritance

tmsesqlscript

  

Executes each statement of SQL (split on term) in turn

|

tcustomsqlstatement

|

tmsecomponent,itransactionclient,idatabaseclient

  

Extends the FPC tcomponent with object linking facilities and the like; base of every MSEgui component

|

tcomponent,ievent,iificommand,iificlient

|

tpersistent

|

TObject

Description

Executes each statement of SQL (split on term) in turn. execute activates transaction if needed (issuing the backend's BEGIN), but does not commit it — call transaction.Commit/CommitRetaining afterwards yourself.

The afterconnect and beforedisconnect properties of the connection components take a tmsesqlscript, executed each time the connection is opened or closed: use it for session settings, or e.g. ATTACH DATABASE with SQLite. Note that the 'Test' button of the SQL editor in MSEide really executes the script.


Documentation generated on: 2026-10-03