Board index » delphi » ClientDataSet ApplyUpdates as a transaction

ClientDataSet ApplyUpdates as a transaction

Scenary:

 I have a master table with 6 details tables using ClientDataSets.

When I apply updates using Tables o TQuery with Cache I call
database.ApplyUpdates with all DataSet in the same transaction, so, if there
is a problem none is commited.

I have not found the way to do that with ClientDataSets. With ClientDataSet
I need to call ApplyUpdates for each ClientDataSet. If a problem occurs
making the applyUpdates on the table 4, How can I revert all applyupdates
commited correctly in the table 1,2, and 3 ? in another words, How can I use
the many ClienteDataSet.applyUpdates as one transaction?

Thanks,

Pedro

 

Re:ClientDataSet ApplyUpdates as a transaction


You need to nest your client datasets. Take a look at "Nested tables" in the
help docs and see if that provides you with enough info. Basically, you'll
have your master client dataset and 6 nested datasets. Are you using
providers to get the data into your client datasets?

Natalie

Quote
"Pedro Mir" <pedro...@dimelo.com> wrote in message news:3c1a5d5b_2@dnews...
> Scenary:

>  I have a master table with 6 details tables using ClientDataSets.

> When I apply updates using Tables o TQuery with Cache I call
> database.ApplyUpdates with all DataSet in the same transaction, so, if
there
> is a problem none is commited.

> I have not found the way to do that with ClientDataSets. With
ClientDataSet
> I need to call ApplyUpdates for each ClientDataSet. If a problem occurs
> making the applyUpdates on the table 4, How can I revert all applyupdates
> commited correctly in the table 1,2, and 3 ? in another words, How can I
use
> the many ClienteDataSet.applyUpdates as one transaction?

> Thanks,

> Pedro

Re:ClientDataSet ApplyUpdates as a transaction


If the tables to applyupdates is not necesarily a detail table. Example, a
table that count the last ID used. How can I applyupdates to the master and
the last id table as the same transaction ?

With begin

Quote
"Natalie Boodram" <natal...@sirs.com> wrote in message

news:3c1a6603_1@dnews...
Quote
> You need to nest your client datasets. Take a look at "Nested tables" in
the
> help docs and see if that provides you with enough info. Basically, you'll
> have your master client dataset and 6 nested datasets. Are you using
> providers to get the data into your client datasets?

> Natalie

> "Pedro Mir" <pedro...@dimelo.com> wrote in message

news:3c1a5d5b_2@dnews...
Quote
> > Scenary:

> >  I have a master table with 6 details tables using ClientDataSets.

> > When I apply updates using Tables o TQuery with Cache I call
> > database.ApplyUpdates with all DataSet in the same transaction, so, if
> there
> > is a problem none is commited.

> > I have not found the way to do that with ClientDataSets. With
> ClientDataSet
> > I need to call ApplyUpdates for each ClientDataSet. If a problem occurs
> > making the applyUpdates on the table 4, How can I revert all
applyupdates
> > commited correctly in the table 1,2, and 3 ? in another words, How can I
> use
> > the many ClienteDataSet.applyUpdates as one transaction?

> > Thanks,

> > Pedro

Re:ClientDataSet ApplyUpdates as a transaction


We've been using the Midas Essentials Pack to apply updates to unrelated
client datasets as part of the same transaction. The site we downloaded them
from initially was www.openave.net, but I couldn't access it this morning.
I'm not sure if it's permanently down or just temporary.

Natalie

Quote
"newsgroups.borland.com" <pedro...@dimelo.com> wrote in message

news:3c1ba349_1@dnews...
Quote
> If the tables to applyupdates is not necesarily a detail table. Example, a
> table that count the last ID used. How can I applyupdates to the master
and
> the last id table as the same transaction ?

Re:ClientDataSet ApplyUpdates as a transaction


Quote
Natalie Boodram wrote:
> We've been using the Midas Essentials Pack to apply updates to unrelated
> client datasets as part of the same transaction. The site we downloaded them
> from initially was www.openave.net, but I couldn't access it this morning.
> I'm not sure if it's permanently down or just temporary

        Open Avenue went bust along with the rest of the "dot coms."  However, a
quick Google search for "Midas Essentials Pack" found
http://sourceforge.net/projects/midess/

        -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

Re:ClientDataSet ApplyUpdates as a transaction


Thanks for finding that!

Quote
"Craig Stuntz" <cstuntz@no_spam.vertexsoftware.com> wrote in message

news:3C1E217A.8080201@no_spam.vertexsoftware.com...
Quote
> http://sourceforge.net/projects/midess/

Other Threads