Board index » delphi » Applyupdates(0) stop transaction?

Applyupdates(0) stop transaction?

Hello ng,
<using D5, SP1, clientdatasets, ibx>
Does somecds.Applyupdates(0) stop the transaction that somecds was connected
to, and perform a transaction.commit? If not, then do I have to close
somecds after applyupdates so that changes are committed? Please show me the
proper approach. Thank you.

Jeff

 

Re:Applyupdates(0) stop transaction?


Make sure the the AutoCommit property of the IBTransaction component
is set to saCommit. Then transactions will start and commit
automatically.

On Mon, 10 Feb 2003 10:13:10 +0800, "Jeff Plata" <prin...@hotmail.com>
wrote:

Quote
>Hello ng,
><using D5, SP1, clientdatasets, ibx>
>Does somecds.Applyupdates(0) stop the transaction that somecds was connected
>to, and perform a transaction.commit? If not, then do I have to close
>somecds after applyupdates so that changes are committed? Please show me the
>proper approach. Thank you.

>Jeff

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Re:Applyupdates(0) stop transaction?


Quote
Bill Todd wrote:

> Make sure the the AutoCommit

AutoStopAction

Quote
> property of the IBTransaction component
> is set to saCommit. Then transactions will start and commit
> automatically.

> On Mon, 10 Feb 2003 10:13:10 +0800, "Jeff Plata" <prin...@hotmail.com>
> wrote:

> >Hello ng,
> ><using D5, SP1, clientdatasets, ibx>
> >Does somecds.Applyupdates(0) stop the transaction that somecds was connected
> >to, and perform a transaction.commit? If not, then do I have to close
> >somecds after applyupdates so that changes are committed? Please show me the
> >proper approach. Thank you.

> >Jeff

> --
> Bill (TeamB)
> (TeamB cannot respond to questions received via email)

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Your only obligation in any lifetime is to be true to yourself.  Being true to
anyone else or anything else is not only impossible, but the mark of a fake
messiah.   (R Bach)

Re:Applyupdates(0) stop transaction?


Thanks. I failed to mention I was using nested dataset (master-detail), both
CDSes connected to one common ibtxn. Ibtxn.autostopaction = saCommit indeed.
But after mastercds.applyupdates, the ibtxn is left open (active=true),
while the ibquery for the detailcds is also active. Suprisingly, the
detailIbquery is never closed even after mastercds.applyupdates, but the
masterIbquery is closed. I surmise that to have ibtxn autocommit, both
ibqueries must close, which just do not happen in my case. Please help me.
Thank you.

(I have no fancy codes in app.)

Quote

> > >Hello ng,
> > ><using D5, SP1, clientdatasets, ibx>
> > >Does somecds.Applyupdates(0) stop the transaction that somecds was
connected
> > >to, and perform a transaction.commit? If not, then do I have to close
> > >somecds after applyupdates so that changes are committed? Please show
me the
> > >proper approach. Thank you.

> > >Jeff

> > --
> > Bill (TeamB)
> > (TeamB cannot respond to questions received via email)

> --
> Jeff Overcash (TeamB)
>       (Please do not email me directly unless  asked. Thank You)
> Your only obligation in any lifetime is to be true to yourself.  Being
true to
> anyone else or anything else is not only impossible, but the mark of a
fake
> messiah.   (R Bach)

Re:Applyupdates(0) stop transaction?


Okay, so here's what i figured with master-detail nested datasets using ibx
5.03. I hope somebody could confirm this and teach better approach.

When opening the cds, provider fires up transaction, executes dataset sql,
populates cds, closes dataset, then stops transaction. With master-detail
cds, the transaction does not commit after provider fetched data because the
child dataset did not close for some reason. After each mastercds.close
command I manually closed (ibdetailqry.close) the child dataset, thus
closing the connected transaction. So far this method satisfies my needs,
but I hope there is a better, automatic way. Thanks.

Quote
"Jeff Plata" <prin...@hotmail.com> wrote in message

news:3e49bf9f@newsgroups.borland.com...
Quote
> Thanks. I failed to mention I was using nested dataset (master-detail),
both
> CDSes connected to one common ibtxn. Ibtxn.autostopaction = saCommit
indeed.
> But after mastercds.applyupdates, the ibtxn is left open (active=true),
> while the ibquery for the detailcds is also active. Suprisingly, the
> detailIbquery is never closed even after mastercds.applyupdates, but the
> masterIbquery is closed. I surmise that to have ibtxn autocommit, both
> ibqueries must close, which just do not happen in my case. Please help me.
> Thank you.

> (I have no fancy codes in app.)

> > > >Hello ng,
> > > ><using D5, SP1, clientdatasets, ibx>
> > > >Does somecds.Applyupdates(0) stop the transaction that somecds was
> connected
> > > >to, and perform a transaction.commit? If not, then do I have to close
> > > >somecds after applyupdates so that changes are committed? Please show
> me the
> > > >proper approach. Thank you.

> > > >Jeff

> > > --
> > > Bill (TeamB)
> > > (TeamB cannot respond to questions received via email)

> > --
> > Jeff Overcash (TeamB)
> >       (Please do not email me directly unless  asked. Thank You)
> > Your only obligation in any lifetime is to be true to yourself.  Being
> true to
> > anyone else or anything else is not only impossible, but the mark of a
> fake
> > messiah.   (R Bach)

Re:Applyupdates(0) stop transaction?


Quote
Jeff Plata wrote:

> Okay, so here's what i figured with master-detail nested datasets using ibx
> 5.03. I hope somebody could confirm this and teach better approach.

> When opening the cds, provider fires up transaction, executes dataset sql,
> populates cds, closes dataset, then stops transaction.

Wrong.  The transaction state is directly tied to the AutoStopAction.  MIDAS
does not control transactions at all during the read process, that is totally
left to the source Dataset.  It only controls transactions during the
ApplyUpdates phase and then only if the transaction starts out closed at the
beginning.

Quote
> With master-detail
> cds, the transaction does not commit after provider fetched data because the
> child dataset did not close for some reason. After each mastercds.close
> command I manually closed (ibdetailqry.close) the child dataset, thus
> closing the connected transaction. So far this method satisfies my needs,
> but I hope there is a better, automatic way. Thanks.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Your only obligation in any lifetime is to be true to yourself.  Being true to
anyone else or anything else is not only impossible, but the mark of a fake
messiah.   (R Bach)

Other Threads