Advantage TDataSet Descendant
Sets a field value in a table to a string value.
procedure AdsSetString( strFieldName : String; strValue : String );
|
strFieldName |
Name of field to set. |
|
strValue |
Store this data in the field. |
CAUTION It is recommended that this Advantage extended method not be used. Please read the Caution About Extended Methods for more information. The suggested native Delphi method to use instead is: TField.AsString. See your Delphi documentation for more information about this native Delphi method.
AdsSetString can be used to set values for character, memo, logical, and fields. To set numeric and date fields with string values, use AdsSetField.
AdsTable1.Edit;
AdsTable1.FieldByName( ‘LastName’ ).AsString := ‘Smith’;
AdsTable1.FieldByName( ‘Salary’ ).AsString = ‘4.95’;
AdsTable1.FieldByName( ‘BirthDay’ ).AsString = ‘10/21/80’;