Advantage Database Server

TAdsTable.AdsSetField

Advantage TDataSet Descendant

TAdsTable.AdsSetField

Advantage TDataSet Descendant

This is the first topic This is the last topic  

TAdsTable.AdsSetField

Advantage TDataSet Descendant

This is the first topic This is the last topic  

Stores the given data into the specified field.

Syntax

procedure AdsSetField( strFieldName : String; strBuffer : String );

Parameter

strFieldName

Name of field to set.

StrBuffer

Data to store in 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.

Description

AdsSetField can be used to store logical, string, memo, numeric, date, short date, double, CurDouble, Money, integer, short integer, time, time stamp, image, binary, RowVersion, ModTime, and raw data.

Dates, times, timestamps, numerics, and Money values are expected to be given as text strings. Dates are expected to be formatted the same as the DateFormat setting. For example, to set a timestamp field, the value could be "7/28/1996 14:30:25". To set empty or null values in fields, use AdsSetEmpty. Setting the value of a field requires a data lock on the table, either a record lock or a file lock. If no lock is held on the current record or table, the Advantage Client Engine will attempt to get an implicit lock on the record. Implicit locks are released when the record is updated on the server.

Example

AdsTable1.FieldByName( ‘Salary’ ).AsString = ‘4.95’;

AdsTable1.FieldByName( ‘BirthDay’ ).AsString = ‘10/21/80’;

See Also

AdsGetField

AdsSetBinary

AdsSetDate

AdsSetDouble

AdsSetLogical

AdsSetLong

AdsSetString