RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TUpdateSQL.SetParams Method (TDataset, TUpdateKind)

Binds parameters in an SQL statement prior to statement execution.

Pascal
procedure SetParams(ADataset: TDataset; UpdateKind: TUpdateKind); virtual; overload;
procedure SetParams(UpdateKind: TUpdateKind); virtual; overload;
C++
virtual __fastcall SetParams(TDataset ADataset, TUpdateKind UpdateKind);
virtual __fastcall SetParams(TUpdateKind UpdateKind);

Call SetParams to bind parameters in an SQL statement associated with the update object prior to executing the statement. UpdateKind indicates the type of statement for which to bind parameters, and can be one of the following values:

Value 
Meaning 
ukDelete  
Bind parameters for the SQL statement used to delete records (DeleteSQL).  
ukInsert  
Bind parameters for the SQL statement used to insert new records (InsertSQL).  
ukModify  
Bind parameters for SQL statement used to update records (ModifySQL).  

Parameters are indicated in an SQL statement by a colon. Except for the leading colon in the parameter name, the parameter name must exactly match the name of an existing field name for the dataset.

Note: Parameter names can be prefaced by the 'OLD_' indicator. If so, the old value of the field is used to perform the update instead of any updates in the cache.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!