Subject | Re: [IBO] Transaction with master-child relationship |
---|---|
Author | Alfred Seetoh |
Post date | 2003-12-08T12:21:21Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
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?
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 it
works. 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 anyway?
> At 10:29 AM 8/12/2003 +0000, you wrote:wrote:
> >--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...>
> > > At 09:53 AM 8/12/2003 +0000, you wrote:correct
> > >
> > >
> > > >KeyLinks of QueryAddress:
> > > > ADDRESS.ID
> > > > ADDRESS.ADDRESS_TYPE
> > > >
> > > >KeySource: *Blank*
> > > >
> > > >MasterSource: DSCustomer
> > > >MasterLinks: ADDRESS.ID=CUSTOMER.CUST_ID
> > >
> > > Do you have the RequestLive property set true in the detail set?
> >
> >Yes, the RequestLive property for both queries are set to true.
> >Basically the funny part is, why does it work when I use
> >IB_TransactionBar to commit. The rest of the setup should be
> >because I followed the tutorial's setup closely. Weird right?rows from
>
> It only suggests *something* is missing that prevents the detail
> getting posted until the transaction is finally committed. Doesthis occur
> with every detail insert, or just the last one? It could be thatyou are
> not calling Post on detail rows that don't get posted in theOnNewRow event
> for the succeeding insert...what the transaction bar achieves, thatyour
> code does not, is to test the NeedToPost properties of alldatasets before
> calling Commit.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?
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 it
works. 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 anyway?