TField.SetData¶
Save the field data.
Declaration¶
Source position: db.pas line 427
public
procedure SetData(Buffer: Pointer); overload; overload;
procedure SetData(Buffer: Pointer; NativeFormat: Boolean); overload; overload;
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¶
| Name | Description |
|---|---|
| TField.GetData | Get the data from this field. |
| TField.Value | Value of the field as a variant value. |