Subject Re: [IBO] Re: Preventing Refresh with IBOQuery
Author Luiz Alves
Since Nando is using a grid bound to datasource of the dataset being
inserted, He will see the news rows inserted.

1. Nando can use EnableControls e DisableControls to avoid see each record
inserted
2. Use a separate tiboXXX or tib_XX to do this inserts not bound to a grid.

Luiz.

----- Original Message -----
From: <rj@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, March 06, 2001 4:17 PM
Subject: [IBO] Re: Preventing Refresh with IBOQuery


> Hello,
>
> i am not very experienced with using IBO.
>
> i agree with Nando, that different transactions
> should help... i am wondering since i thought that
> the newly inserted records will not be visible
> to your select statement. maybe it will help to
> set the transaction isolation to "snapshot", so
> no changes in the database will be visible to any
> statement executed until the transaction is
> committed (i have not tried out, yet ...)
>
> since you seem to copy many records, you should use
> an TIB_Cursor for your select statement. As far as I
> know the query object will read the results of your
> select statement into main memory on the client.
>
> for your insert statement a TIB_DSQL-Object can be used.
> the documentation states, it has less overhead.
>
> on the "iboAccess" Tab sheet is a IBDataPump Control,
> which looks suitable for your job (i have not been
> trying it). Maybe it has a workaround for your problem ?
>
> HTH
>
> Ralph
>
> --- In IBObjects@y..., rnagle@y... wrote:
> > 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.
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>