From RAD Studio API Documentation
Jump to: navigation, search


function GetData(var Buffer: TValueBuffer; NativeFormat: Boolean = True): Boolean; overload;
function GetData(Buffer: Pointer; NativeFormat: Boolean = True): Boolean; overload; deprecated 'Use overloaded method instead';


bool __fastcall GetData(System::DynamicArray<System::Byte> &Buffer, bool NativeFormat = true)/* overload */;
bool __fastcall GetData _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (void * Buffer, bool NativeFormat = true)/* overload */;


Type Visibility Source Unit Parent
function public
Data.DB TField


Returns the unformatted data for the field.

Call GetData to return the data in a field to a buffer. GetData is intended primarily for internal use.

Buffer must have sufficient space allocated for the data. Use the DataSize property to determine the space required.

Unlike the DisplayText, Text, or AsXXX properties, GetData does not translate the data into a specific type. Instead, it uses a type that reflects the underlying database information unless you set NativeFormat to false. NativeFormat indicates whether the raw database information must be translated into the underlying type associated with the specific type of database field. When NativeFormat is true, the dataset does not translate the raw database information. When NativeFormat is false, the dataset must translate the field value into the type associated with the field.

If the data is NULL, GetData returns false and no data is transferred to Buffer. Otherwise, GetData returns true.

Note: GetData cannot be used to read data from BLOB or memo fields. To read BLOB data, use the stream returned by the CreateBlobStream method of the dataset or the SaveToStream method of the BLOB field.

See Also

Code Examples