ZUpdateSQL

TZUpdateSQL provides instructions for modifying the data of a normally uneditable query result. The TZUpdateSQL component is similar to the Delphi BDE component TZUpdateSQL.

The parameter "OLD_" for SQL statements T
he "OLD_" prefix holds the value of a field before it has been changed.
This is very helpful if you need the contents of a field before the change, for example here for ZUpdateSQL. Like TZQuery, TZUpdateSQL can process several SQL statements in succession. If the data is to be updated, RequestLive must be set to true.

 

Properties


DeleteSQL

Contains the SQL command (s) to delete ... record (s).


InsertSQL
Contains the SQL command (s) to insert ... record (s).


ModifySQL
Contains the SQL command (s) to change .. record / records.

MultiStatements
Whether multistatements are allowed, true means yes, false no.


Name
The name of the TZUpdateSQL component.


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 := '...';

These instructions use the value 'Johann' to the parameter: Name
bound, 'Maier' to the parameter: Surname.


RefreshSQL
Apparently not yet integrated!

Tag

A Lazarus standard property for distinguishing components, etc.


UseSequenceFieldForRefreshSQL
Apparently not yet integrated!

Events

The name of events is self-explanatory

AfterDeleteSQL
AfterDeleteSQLStatement

AfterInsertSQL
AfterInsertSQLStatement

AfterModifySQL
AfterModifySQLSatement

BeforeDeleteSQL
BeforeDeleteSQLStatement

BeforeInsertSQL
BeforeInsertSQLStatement

BeforeModifySQL
BeforeModifySQLStatement

 

<>

© CMBasic.de