RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomClientDataSet.GetFieldData Method (Integer, Pointer)

Retrieves the current value of a field.

Pascal
function GetFieldData(Field: TField; Buffer: Pointer): Boolean; override;
function GetFieldData(FieldNo: Integer; Buffer: Pointer): Boolean; override; overload;
C++
virtual __fastcall Boolean GetFieldData(TField Field, void * Buffer);
virtual __fastcall Boolean GetFieldData(int FieldNo, void * Buffer);

Call GetFieldData to obtain the value of a field component as it is stored in the record buffer. TField objects call GetFieldData to implement their GetData method. 

The Field or FieldNo parameter indicates the field whose data should be fetched. Field specifies the component itself, while FieldNo indicates its field number. The Buffer parameter is a memory buffer with sufficient space to accept the value of the field as it exists in the database (unformatted and untranslated). NativeFormat indicates whether the dataset fetches the field in the IDE's native format for the field type. When NativeFormat is false, the dataset must convert the field value to the native type using its Translate method. This allows the field to handle data from different types of datasets (ADO-based, BDE-based, and so on) in a uniform manner.  

GetFieldData returns a value that indicates whether the data was successfully fetched. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!