Subject | Re: [IBO] how to delete all record in Tiboquery? |
---|---|
Author | bigred17201720 |
Post date | 2002-09-06T04:37:29Z |
Thanks to all reply.
I explain my situation.
I have one M/D relation form, When user press the
<delete> button,
1.I will start 1 transation
2. delete all the detail records
3. delete the master record.
4. apply the detail , apply the master.
5. commit transation.
and I also try the follow code with same result;
iboquery.first
while not iboquery.eof do
iboquery.delete;
iboquery.applyupdate;
iboquery.close;
iboquery.open;
Kadee
I explain my situation.
I have one M/D relation form, When user press the
<delete> button,
1.I will start 1 transation
2. delete all the detail records
3. delete the master record.
4. apply the detail , apply the master.
5. commit transation.
and I also try the follow code with same result;
iboquery.first
while not iboquery.eof do
iboquery.delete;
iboquery.applyupdate;
iboquery.close;
iboquery.open;
Kadee
--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> Not sure, how about you send a sample application which
demonstrates your
> problem.
>
> I must say, this is probably the most inefficient way to
accomplish this.
> You will for sure want to do it differently anyway but if
there is a problem
> with IBO I'd like to resolve it too.
>
> Regards,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
> -- We may not have it all together --
> -- But together we have it all --
>
>
> ----- Original Message -----
> From: "bigred17201720" <kadee@p...>
> To: <IBObjects@y...>
> Sent: Thursday, September 05, 2002 1:37 AM
> Subject: [IBO] how to delete all record in Tiboquery?
>
>
> > Hi,
> >
> > I use ibodatabase+iboquery(catchupdate,requrestlive).
> >
> > when I want to delete all record in iboquery,
> > my code like follow:
> >
> > while not iboquery.isempty do
> > iboquery.delete;
> > iboquery.applyupdate;
> > iboquery.close;
> > iboquery.open;
> >
> >
> > after the iboquery open, some time I will
> > find there is still 1 record in iboqery.
> > so I change change the code as:
> >
> >
> > while not iboquery.isempty do
> > iboquery.delete;
> > iboquery.applyupdate;
> > iboquery.close;
> > iboquery.open;
> > while not iboquery.isempty do
> > iboquery.delete;
> > iboquery.applyupdate;
> > iboquery.close;
> > iboquery.open;
> >
> >
> > after twice apply the delete action,
> > the iboquery finally empty.
> >
> > but why I need twice delete action?
> >
> > Please Help.
> >
> > Kadee