Page 1 of 1

Copy field structure from table

Posted: Tue 28 Dec 2004 02:20
by kenny
Hi,
How do I copy the structure of particular table into virtual table? So that I can duplicate the record easyly.
Thanks

Posted: Tue 28 Dec 2004 17:13
by Paul
You can use Assign method of TVirtualTable to copy fields and data from other TDataSet component.

Code: Select all

OraQuery1.SQL.Text := 'SELECT * FROM DEPT';
OraQuery1.Active := True;
VirtualTable1.Assign(OraQuery1);
VirtualTable1.Active := True;