Assign

Declaration: TDataTable.Assign (Source: TDataTable): integer;
The Assign method assigns one TDataTable to another. The function returns -1 if the Source is not of the type TDataTable, otherwise it returns a zero value.

Hint: In general, the statement Destination := Source; is not the same as the statement Destination.Assign(Source);. The first statement makes Destination referring to the same object as Source, whereas the second statement copies the contents of the object referenced by Source into the object referenced by Destination.