RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIBCustomDataSet.GetFieldData Method (TField, Pointer)

Reads the field data into a buffer.

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

Reads the field data into a buffer. 

Delphi syntax:  

         function GetFieldData(FieldNo: Integer; Buffer: Pointer): Boolean; overload;
    function GetFieldData(Field: TField; Buffer: Pointer): Boolean; overload; override;
    function GetFieldData(Field: TField; Buffer: Pointer; NativeFormat: Boolean): Boolean; overload; override;

C++ syntax:

         virtual bool __fastcall GetFieldData(Db::TField* Field, void * Buffer);
    virtual bool __fastcall GetFieldData(Db::TField* Field, void * Buffer, bool NativeFormat);
    virtual bool __fastcall GetFieldData(int FieldNo, void * Buffer);

Description  

Most applications do not need to call GetFieldData. TField objects call this method 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 Delphi's native format for the field type. When NativeFormat is false, the dataset must convert the field value to the native type. This allows the field to handle data from different types of datasets (IBX, BDE-based, and so on) in a uniform manner. 

GetFieldData returns true if the data was successfully written to Buffer. 

 

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