To copy a table, specify the DatabaseName and TableName properties of the TABSTable component and then call the CopyTable method.
If you would like to copy table to the same database file, you should not pass second parameter to the CopyTable call.
Example:
ABSTable1.DatabaseName := 'emp_db';
ABSTable1.TableName := 'employee';
ABSTable1.CopyTable('new_employee');
If you would like to copy table to the another database file, you should pass destination database file name as as second parameter to the CopyTable call.
Example:
ABSTable1.DatabaseName := 'emp_db';
ABSTable1.TableName := 'employee';
ABSTable1.CopyTable('new_employee', 'c:\data\emp_db2.abs');
|
|