CopyDataColumnToArray

Declaration: TDataTable.CopyDataColumnToArray (Col: integer; var DstArray: TDoubleArray): integer;
The function CopyDataColumnToArray copies the numeric data of the column Col to the open array DstArray. The size of DstArray is automatically adjusted to the number of rows of the data table. Nominal data values of the data table are replaced by their ordinals when copying them to DstArray.

The function returns the following error codes:

 0 ... everything is OK, data has been copied
-1 ... invalid parameter Col (valid range is 1..NrOfColumns)