Copying records from one table to another ?


I have a big problem !

I have two MS Access 97 Database-files.
I use use the components (TDAODatabase and TDAOQuery)
from Timur Islamov's Diamond Access (v 1.35) to connect to Delphi

The first file is a Template database which has a table named
dbTemplate: TDAODatabase;
qrElementsT: TDAOQuery;

The second file is an Analysis database which also has a table named
dbAnalysis: TDAODatabase;
qrElementsA: TDAOQuery;

A user fills an Elements table in a new empty Template database, which
works fine.

When the user starts an analysis, a new empty Analysis database is
connected to dbAnalysis and the Elements table from the Template
database must be copied to the Elements table in the Analysis

I tried to do this with the following SQLstatement, run from the
source: qrElementsT.SQL:

frmTOCWAnalysis.qrElementsT.SQL.Add('INSERT INTO qrElementsA IN
dbAnalysis SELECT * FROM qrElementsT');

When executed, I get an error that it can't find qrElementsT...
I already tried too many different possibilities, replacing the qr..
with real paths etc., but nothing seems to work.

Executing normal SELECT statements with ORDER etc always works fine.

I don't know why it goes wrong. Can someone help me, please ? :)