[View Borland Home Page][View Product List][Search This Web Site][View Available Downloads][Join Borland Online][Enter Discussion Area][Send Email To Webmaster]

BDE API Examples (DbiCopyTable)

Duplicates the specified source table to a destination table.

Copy one table to another

If you are creating an exact copy of a table, this is by far the fastest method. This will also copy indexes on non-SQL databases.
This example uses the following input: CopyTable(Table1, 'customer_copy.db', TRUE);
procedure CopyTable(Table: TTable; TableName: string; Overwrite: boolean);
var
  Props: CURProps;

begin
  Check(DbiGetCursorProps(Table.Handle, Props));
  Check(DbiCopyTable(Table.DBHandle, Overwrite, PChar(Table.TableName),
      Props.szTableType, PChar(TableName)));
end;

Back to BDE API Reference Page


DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.
Trademarks & Copyright © 1998 Borland International, Inc.