Subject Odp: [IBO] BeforePost on Delete
Author Yagi
Hi,

Well, it is not a problem form me.
It is a different way it's been done in TTable so i was confused.

But if i make changes in the BeforePost event and then i do Delete(), what
will happen?

Should if put the line of code in BeforePost like this?

void __fastcall TMainForm::ibqSesjeBeforePost(TIB_Dataset *IB_Dataset)
{
if(ib_Query->State == dssDelete) return; /*i must put this line, right?*/

. /*some additional changes in ib_Query */

if(ib_Query->FieldByName("FIELD1")->IsNotNull &&
ibqSesjaKarnety->FieldByName("FIELD2")->AsInteger == 0)
{ /*message box for user*/
Application->MessageBox("Stop", Application->Title.c_str(), MB_OK |
MB_ICONEXCLAMATION);
Abort(); .
}
.
.

}

Jarek

----- Original Message -----
From: Jason Wharton <jwharton@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, February 16, 2001 8:00 PM
Subject: Re: [IBO] BeforePost on Delete


> Where this is different is that I have mixed in the Delete cycle into the
> Post cycle. There is no prior precedent that I need to respect here and I
> have never needed it any other way than it is now.
>
> So, as far as I am concerned it is OK. Anyone disagree?
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Yagi" <yagi@...>
> To: "IBObjects" <IBObjects@yahoogroups.com>
> Sent: Thursday, February 15, 2001 10:45 AM
> Subject: [IBO] BeforePost on Delete
>
>
> > Hi,
> >
> > When I do Delete on IB_Query the event BeforePost is trigered (even
before
> > BeforeDelete).
> > The events are trigered in following way:
> > 1. BeforeDelete
> > 2. BeforePost
> > 3. AfterPost
> > 4. AfterDelete
> >
> > Is this OK?
> >
> > I got version 3.6 Cd of IBO.
> >
> > Jarek
> >
> >
> >
> >
> >
>
>
>
>
>
>