TurboDB VCL Component Library TTdbDataSet.Replace |
Previous Top Next |
Replaces field values in a range of rows.
Delphi syntax:
procedure Replace(const Filter, Fields, Expressions: string): LongInt;
C++ syntax:
int __fastcall Replace(const AnsiString Filter, const AnsiString Fields, const AnsiString Expressions);
Description
Replace sets the values of the Fields to the values calculated by Expressions for all records that meet the Filter's condition. The Expressions are evaluated in the context of each record.
Example
The following example appends the digit nine to all phone numbers from Reading, GB:
Replace('Phone like "+44 118*", 'Phone', 'Phone + "9"');