Hi all,
I've got the following problem:
I create a copy table, using the following code
with tblSource do
begin
databaseName := sDBaseName;
tableName := sSourceTableName;
end;
with tblDest do
begin
databaseName := sDbaseName;
tableName := sDestTableName;
end;
with tblDest do
try
tblSource.fieldDefs.update;
fieldDefs.assign(tblSource.fieldDefs);
tblSource.IndexDefs.update;
indexDefs.assign(tblSource.indexDefs);
createTable; // create clone table
This works fine, unless I leave the destination table (component) open
at design time. No hold on, I do shut all the tables at OnCreate() by
the following code:
// close all tables
for i := 0 to componentCount-1 do
begin
try
if components[i] is TTable then
with TTable(components[i]) do
begin
close;
dataBaseName := sMainDbaseName;
end;
Summarised:
All tables are inactive at the time the table in question is to be
cloned. When the table component connected to the clone table is open at
design-time the error message "Table is busy" is generated. When the
table is closed at design-time there is not problem at all.
Any ideas?
TIA
John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042
application/ms-tnef