ZSQLProcessor

ZSQLProcessor works similar to ZQuery, but SQL files can be loaded directly and executed immediately. Furthermore, there are some parameters that can not be set in ZQuery.

Properties


CleanupStatements

No assignment found, meaning is for clear all properties user have set.


Connection

Connects to ZConnection (= database). Click on> far left to display the ZConnection Properties.


Delimiter

The delimiter (separator) between the SQL commands. Default is a semicolon.

Name

The name of the ZSQLProcessor component.

ParamChar

The identifier before the parameters. Is usually a colon and does not need to be changed.


ParamCheck

ParamCheck determines if the Params property is cleared and regenerated if the SQL property of the query changes at runtime. By default, ParamCheck is True. This ensures that the correct number of parameters are generated for the current SQL statement.


Params

When preparing a query, it becomes an array of params for the parameters a dynamic SQL statement. Params is a starting zero-indexed array of TParam objects with one element per parameter of the query; the first parameter is Parms (0), the second params (1), and so on.

For example, suppose a ZQuery component named ZQuery1 has the following SQL statement:

INSERT INTO ADRESS (NAME, SURNAME, ...)
VALUES (:Name, :Surname, ...)
Params kann dann dazu verwendet werden, die Werte der Parameter wie
folgend zu spezifizieren:
ZQuery1.Params(0).AsString := 'Johann';
ZQuery1.Params(1).AsString := 'Maier';
ZQuery1.Params(2).AsString := ...

Mit diesen Anweisungen wird der Wert 'Johann' an den Parameter :Name
gebunden, 'Maier' an den Parameter :Surname.


Script

Contains the text of the SQL statement to be executed by a query component. The property type is TStrings. In contrast to ZQuery, SQL statements with SetTerm are also possible here.


Tag

A Lazarus standard property for distinguishing components, etc.

 

Ereignisse

 

AfterApplyUpdates
When you call ApplyUdates to write the data to the database, AfterApplyUpdates is called after applying ApplyUpdates, and you can use your own program parts here.

AfterCancel
Will be triggered after a cancellation process.


AfterClose
Dispatched after the record has been closed.


AfterDelete
Will be triggered after a successful deletion.


AfterEdit
Dispatched after the record has been placed in edit mode.


AfterInsert
Dispatched after the record has been placed in insert mode.


AfterOpen
Dispatched after the table has been opened.


AfterPost
Dispatched after changes have been written to the underlying database.


AfterRefresh
Will be triggered after a refresh


AfterScroll
Dispatched after the cursor has changed position.


BeforeApplyUpdates
Dispatched before ApplyUpdates is called.


BeforeCancel
Will be triggered before a cancellation process.


BeforeClose
Dispatched before the table / query is closed.


BeforeDelete
Is triggered before a deletion.


BeforeEdit
Dispatched before putting the record into edit mode.


BeforeInsert
Dispatched before the record is put into insert mode.


BeforeOpen
Dispatched before a table / query is opened.


BeforePost
Called before changes are uploaded to the database.


BeforeRefresh
Dispatched before the Refresh command is executed.


BeforeScroll
Dispatched before the cursor changes position.


OnApplyUpdateError
Dispatched when ApplyUpdate fails.


OnCalcFields
Dispatched when calculating computed field values.


OnDeleteError
Dispatched when a deletion fails.


OnEditError
If an error occurs while editing


OnFilterRecord
Triggered while filtering records.


OnNewRecord
Dispatched when a new record is created.


OnPostError
Dispatched when a post operation fails.


OnUpdateRecord
Dispatched when an update is issued.

 <>

© CMBasic.de