[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'DB' (#fcl)

TField.SetData

Save the field data

Declaration

Source position: db.pas line 399

public procedure TField.SetData(

  Buffer: Pointer

); overload;

procedure TField.SetData(

  Buffer: Pointer;

  NativeFormat: Boolean

); overload;

Arguments

Buffer

  

Buffer to copy field value from

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

TField.GetData

  

Get the data from this field

TField.Value

  

Value of the field as a variant value


Documentation generated on: May 14 2021