Unit 'DB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TField.GetData

Get the data from this field.

Declaration

Source position: db.pas line 422

public function TField.GetData(

  Buffer: Pointer

):Boolean; overload;

function TField.GetData(

  Buffer: Pointer;

  NativeFormat: Boolean

):Boolean; overload;

Arguments

Buffer

  

Buffer to store field contents in.

Function result

True if data is available.

Arguments

Buffer

  

Buffer to store field contents in.

NativeFormat

  

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

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

TField.IsNull

  

Is the field empty.

TField.SetData

  

Save the field data.

TField.Value

  

Value of the field as a variant value.


Documentation generated on: Oct 02 2024