Sign in Join
FPDoc Onlineexperiment

TField.GetData function

Member of TFieldpublicIn unit DB

Get the data from this field.

Declaration

pascal
function GetData(Buffer: Pointer): Boolean; overload
function GetData(Buffer: Pointer; NativeFormat: Boolean): Boolean
 ; overload

Arguments

Buffer

Buffer to store field contents in.

NativeFormat

Return date/time values in native (TDateTime) format.

Function result

True if data is available.

Description

GetData is used internally by TField to fetch the value of the data of this field into the data buffer pointed to by Buffer. If it returns False if the field has no value (i.e. is Null). If the NativeFormat parameter is true, then date/time formats should use the TDateTime format. It should not be necessary to use this method, instead use the various 'AsXXX' methods to access the data.

Errors

No validity checks are performed on Buffer: it should point to a valid memory area, and should be large enough to contain the value of the field. Failure to provide a buffer that matches these criteria will result in an exception.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.