Copy field structure from table

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

Copy field structure from table

Post by kenny » Tue 28 Dec 2004 02:20

Hi,
How do I copy the structure of particular table into virtual table? So that I can duplicate the record easyly.
Thanks

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Tue 28 Dec 2004 17:13

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;

Post Reply