Subject | Re: [IBO] Transaction with master-child relationship |
---|---|
Author | Alfred Seetoh |
Post date | 2003-12-08T13:49:08Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
I sincerely apologize for this, I don't even remember when I set it
to true. If only I notice CacheUpdates is true, all these wouldn't
have happened.
> At 12:21 PM 8/12/2003 +0000, you wrote:the
>
>
> >All my detail rows are not inserted.
> >Yes I didn't call Post (in code) on detail rows, but it should have
> >been automatically posted when I move up or down in the grid right?
>
> Yes. That's why I wondered if it only affected a single insert, or
> last insert if there were multiple inserts.it
>
> >The astrix did change to the right-arrow.
> >
> >Ok I did the following:
> > if TransactionMain.PostPendingCount > 0 then
> > TransactionMain.PostAll;
> >
> > TransactionMain.Commit;
> >
> >But it still wouldn't work. However if I replace the
> >TransactionMain.Commit with TransactionMain.ApplyUpdates([]), then
> >works.would
>
> Then you must be working with CachedUpdates set to true, and that
> explain it. Sure, with CachedUpdates, you need to ApplyUpdates toall of
> the datasets and follow it up with a hard commit.if you
>
> Post works on a *live* dataset. A cached dataset is not live (even
> set the RequestLive to true...the cachedupdates overrides thedataset
> property).anyway?
>
> >OMG... I really wonder whether I should keep cracking my head
> >thinking how to make it work by calling Commit, or should I just
> >stick with ApplyUpdates. What's the difference between the two
><sigh>
> ApplyUpdates is the CachedUpdates equivalent of Post for a live
> dataset. It doesn't perform a commit - you must call Commit.
>
> Sheesh, these partial problem descriptions waste people's time.
I sincerely apologize for this, I don't even remember when I set it
to true. If only I notice CacheUpdates is true, all these wouldn't
have happened.
> Helen