TDataSet.DataConvert procedure
Convert data from/to native format.
Declaration
procedure DataConvert(aField: TField; aSource: Pointer; aDest: Pointer;
aToNative: Boolean); virtualArguments
aField | Field for which data should be converted. |
aSource | Pointer to memory area with source data. |
aDest | Pointer to memory area for target data. |
aToNative | True if the conversion should happen to native format. |
Description
DataConvert converts the data from field
AField in buffer
ASource to native format and puts the result in
ADest.
If the
aToNative parameter equals
False, then the data is converted from native format to non-native format.
Currently, only date/time/datetime and BCD fields are converted from/to native data.
This means the routine handles conversion between
TDateTime (the native format) and
TDateTimeRec, and between TBCD and currency (the native format)
for BCD fields.
DataConvert is used internally by
TDataset and descendent classes. There should be no need to use this routine in application code.
Errors
No checking on the validity of the buffer pointers is performed. If an invalid pointer is passed, an exception may be raised.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
