Database.ApplyUpdates Vs Transaction.Commit

In article <3d882...@newsgroups.borland.com>, a...@meta.com.au says...

Quote
> I wonder though what Database.ApplyUpdates does with regard to the
> Transaction. I notice that I must call ApplyUpdate before the dataset closes
> (e.g. a scroll of the master). Calling Post alone does not save the work.

        Only with Cached Updates.

Quote
> ApplyUpdates seems to commit but not close the transaction as per
> Transaction.Commit

        Look at the AutoStopAction property of TIBTransaction.  It should
be set to saNone for any application which is not using DataSnap (i.e.,
where the data isn't being resolved from a TClientDataset).  You
*should* have to call Commit manually.

        You may be using an old version of IBX if you don't see this
property.  In that case, get the latest version of IBX from Jeff
Overcash's page on CodeCentral.  Again, you *should* be handling your
transactions manually (calling StartTransaction and Commit) if you're
not using DataSnap.

Quote
> I thought Post saved it to the cache of updates, if so, it should be visible
> again when I scroll back to the detail records..

        It does, but when you scroll the master the detail is running a
new query, hence you lose unapplied changes.

        -Craig

--
 Craig Stuntz [TeamB] Vertex Systems Corp. Columbus, OH
     Delphi/InterBase Weblog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer