Sign in Join
FPDoc Onlineexperiment

TField.SetData procedure

Member of TFieldpublicIn unit DB

Save the field data.

Declaration

pascal
procedure SetData(Buffer: Pointer); overload
procedure SetData(Buffer: Pointer; NativeFormat: Boolean); overload

Arguments

Buffer

Buffer to copy field value from.

NativeFormat

Is the provided data in native format.

Description

SetData saves the value of the field data in Buffer to the dataset internal buffer. The Buffer pointer should point to a memory buffer containing the data for the field in the correct format. If the NativeFormat parameter is true, then date/time formats should use the TDateTime format.

There should normally not be any need to call SetData directly: it is called by the various setter methods of the AsXXX properties of TField.

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.