FireDAC.Comp.DataSet.TFDDataSet.GetFieldData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetFieldData(AFieldNo: Integer; var ABuffer: TValueBuffer): Boolean; overload; override;
function GetFieldData(AField: TField; var ABuffer: TValueBuffer): Boolean; overload; override;

C++

virtual bool __fastcall GetFieldData(int AFieldNo, System::DynamicArray<System::Byte> &ABuffer)/* overload */;
virtual bool __fastcall GetFieldData(Data::Db::TField* AField, System::DynamicArray<System::Byte> &ABuffer)/* overload */;
inline bool __fastcall  GetFieldData(Data::Db::TField* Field, System::DynamicArray<System::Byte> &Buffer, bool NativeFormat){ return Data::Db::TDataSet::GetFieldData(Field, Buffer, NativeFormat); }
inline bool __fastcall  GetFieldData _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (Data::Db::TField* Field, void * Buffer){ return Data::Db::TDataSet::GetFieldData(Field, 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
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDDataSet

Description

Retrieves the current value of a field into a buffer.

FireDAC.Comp.DataSet.TFDDataSet.GetFieldData inherits from Data.DB.TDataSet.GetFieldData. All content below this line refers to Data.DB.TDataSet.GetFieldData.

Retrieves the current value of a field into a buffer.

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 the IDE'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 (ADO-based and so on) in a uniform manner.

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

As implemented in TDataSet, GetFieldData always returns false, indicating that no data was fetched from the specified field. Descendants override this method to fetch data in whatever way is appropriate to the implementation of the dataset.

Note: TDataSet.GetFieldData method expects Integer and Cardinal values instead of LongInt for ftInteger and LongWord for ftLongword.


See Also