IBX.IBCustomDataSet.TIBCustomDataSet.GetFieldData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetFieldData(Field: TField; Buffer: Pointer): Boolean; overload; override; deprecated;
function GetFieldData(Field : TField; var Buffer: TValueBuffer) : Boolean; overload; override;
function GetFieldData(Field: TField; var Buffer: TValueBuffer; NativeFormat: Boolean): Boolean; overload; override;

C++

virtual bool __fastcall GetFieldData _DEPRECATED_ATTRIBUTE0 (Data::Db::TField* Field, void * Buffer)/* overload */;
virtual bool __fastcall GetFieldData(Data::Db::TField* Field, System::DynamicArray<System::Byte> &Buffer)/* overload */;
virtual bool __fastcall GetFieldData(Data::Db::TField* Field, System::DynamicArray<System::Byte> &Buffer, bool NativeFormat)/* overload */;
inline bool __fastcall  GetFieldData(int FieldNo, System::DynamicArray<System::Byte> &Buffer){ return Data::Db::TDataSet::GetFieldData(FieldNo, Buffer); }
inline bool __fastcall  GetFieldData _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (int FieldNo, void * Buffer){ return Data::Db::TDataSet::GetFieldData(FieldNo, Buffer); }
inline bool __fastcall  GetFieldData _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (Data::Db::TField* Field, void * Buffer, bool NativeFormat){ return Data::Db::TDataSet::GetFieldData(Field, Buffer, NativeFormat); }

Properties

Type Visibility Source Unit Parent
function public
IBX.IBCustomDataSet.pas
IBX.IBCustomDataSet.hpp
IBX.IBCustomDataSet TIBCustomDataSet

Description

Reads the field data into a buffer.

Most applications do not need to call GetFieldData. TField objects call this method to implement their GetData method.

  • The Field 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 an uniform manner.

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

Note: GetFieldData(Field: TField; Buffer: Pointer): Boolean; is deprecated and will be removed in further releases. Use the overload that takes a Data.DB.TValueBuffer parameter instead.