Skip to content

TDataSet.DataConvert

Convert data from/to native format.

Declaration

Source position: db.pas line 2058

public 
procedure TDataSet.DataConvert(aField: TField; aSource: Pointer; 
                              aDest: Pointer; aToNative: Boolean)
                              ;  virtual;

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

Name Description
TDataset.GetFieldData Get the data for a field.
TDataset.SetFieldData Store the data for a field.