The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TDataTable
Declaration: function CopyDataColumnFromVector (Col: integer; SrcVec: TVector): integer;

The function CopyDataColumnFromVector copies the numeric data contained in ScrVec into the column Col. If the length of the vector SrcVec is less than the number of rows only the first values of column Col are filled, the remaining cells are left unchanged. If the length of the source vector is greater than the number of rows then only the first NrOfRows values are copied, the rest is ignored.

The function returns the following error codes:

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

Hint: Please note that the method CopyDataFromVector is more flexible as it supports partial copying.

Last Update: 2023-Dec-14