Subject | Preventing Refresh with IBOQuery |
---|---|
Author | rnagle@yahoo.com |
Post date | 2001-03-06T17:15:26Z |
I am writing a application to make copies of existing records in our
database (I need to build a really big database for load testing).
I have an IBOQuery that pulls all the records from one table, and is
connected to another IBOQuery though a DataSource that INSERTS back
into the table with code like:
qrySource.Open;
while NOT qrySource.EOF do
begin
qryTarget.ExecSQL;
qrySource.Next;
end;
The SQL in qrySource is something like
SELECT FIELD1,FIELD2,FIELD3 FROM TABLE
and the SQL in qryTarget is
INSERT INTO TABLE(FIELD1,FIELD2,FIELD3) VALUES(:FIELD1,FIELD2,FIELD3)
The problem I am having is that the inserts from qryTarget are
appearing in qrySource and the program is going into an infinite loop
(well, untill the hard disk fills up anyway).
Is there are anyway I can prevent my inserts from appearing in
qrySource?
I know I could do INSERT INTO....SELECT FROM... but for various
reasons I don't want to do it this way.
database (I need to build a really big database for load testing).
I have an IBOQuery that pulls all the records from one table, and is
connected to another IBOQuery though a DataSource that INSERTS back
into the table with code like:
qrySource.Open;
while NOT qrySource.EOF do
begin
qryTarget.ExecSQL;
qrySource.Next;
end;
The SQL in qrySource is something like
SELECT FIELD1,FIELD2,FIELD3 FROM TABLE
and the SQL in qryTarget is
INSERT INTO TABLE(FIELD1,FIELD2,FIELD3) VALUES(:FIELD1,FIELD2,FIELD3)
The problem I am having is that the inserts from qryTarget are
appearing in qrySource and the program is going into an infinite loop
(well, untill the hard disk fills up anyway).
Is there are anyway I can prevent my inserts from appearing in
qrySource?
I know I could do INSERT INTO....SELECT FROM... but for various
reasons I don't want to do it this way.