Subject Re: [IBO] OnBeforePost called twice (CallStack attached)
Author Jason Wharton
The only other way around this is for me to have it make sure to Post the
master dataset prior to posting any of the details. You see, if you post a
detail and a master is in insert mode it will do a PostRetaining on the
master and then post the detail. Since you are posting everything then it
will eventually revisit the master and complete the Post. Thus, the master
is post retained and then posted in the process of committing the
transaction. I have thought about putting smarts into the transaction.Commit
call so that it will make sure and post master datasets in insert state
prior to any of the details. I think this is something I need to look into
doing for your situation.

I'll log this as an item to look into.

Jason Wharton
CPS - Mesa AZ

----- Original Message -----
From: "ehandbury" <ehandbury@...>
To: <>
Sent: Wednesday, May 01, 2002 2:57 PM
Subject: Re: [IBO] OnBeforePost called twice (CallStack attached)

> Also, triggers are called twice which is causing grief for me.
> --- In IBObjects@y..., "ehandbury" <ehandbury@h...> wrote:
> > Jason, thanks for the answer.
> >
> > I'm glad that its harmless, but...
> > 1) I've got code in the BeforePost that I would prefer to only
> run
> > once.
> > 2) Shouldn't the second call stack scenario (the PostRetaining)
> be
> > the only Post sequence that's run. Why have the 2 Post sequences at
> > all? Couldn't this be optimized?
> >
> > Eric.
> >
> > --- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> > > This should be harmless. It is in the process of doing a
> > PostRetaining on
> > > the master. It has to do this in order to post the detail dataset.
> > >
> > > Jason Wharton
> > > CPS - Mesa AZ
> > >