Board index » delphi » CDS.ApplyUpdates(-1) x CDS.ApplyUpdates(0)

CDS.ApplyUpdates(-1) x CDS.ApplyUpdates(0)

I don't get myself to convince what is written in Help of Delphi. Do you
know to Real it differentiates?

--
Regards,

Anderson Haertel Rodrigues
Brazil - ICQ: 160761625

 

Re:CDS.ApplyUpdates(-1) x CDS.ApplyUpdates(0)


"Anderson Haertel Rodrigues" <e...@eu.com.br> wrote in message
news:3d22ee86_2@dnews...

Quote
> I don't get myself to convince what is written in Help of Delphi. Do you
> know to Real it differentiates?

ApplyUpdates(-1) will save any changes to the database that it can. If you
were updating 3 records and 1 record gave an error, it will still update the
remaining 2.

ApplyUpdates(0) will rollback ALL changes as soon as an error occurs. In the
above example, it will not update any records because one of them had a
problem. Usually, this is the way you want to use it.

Natalie

Re:CDS.ApplyUpdates(-1) x CDS.ApplyUpdates(0)


Thanks.

--
Regards,

Anderson Haertel Rodrigues
Brazil - ICQ: 160761625
"Natalie Boodram" <natal...@sirs.com> escreveu na mensagem
news:3d22f1b0$1_1@dnews...

Quote
> "Anderson Haertel Rodrigues" <e...@eu.com.br> wrote in message
> news:3d22ee86_2@dnews...
> > I don't get myself to convince what is written in Help of Delphi. Do you
> > know to Real it differentiates?

> ApplyUpdates(-1) will save any changes to the database that it can. If you
> were updating 3 records and 1 record gave an error, it will still update
the
> remaining 2.

> ApplyUpdates(0) will rollback ALL changes as soon as an error occurs. In
the
> above example, it will not update any records because one of them had a
> problem. Usually, this is the way you want to use it.

> Natalie

Re:CDS.ApplyUpdates(-1) x CDS.ApplyUpdates(0)


As Natalie said, ApplyUpdates(0) is the one to use. There is a thread here
that might also give you some more information (watch out for url wrap):
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&fram...
&th=9f5671e81f3a771a&seekm=3c6d4910_2%40dnews#link4

--
Dave Rowntree
"Anderson Haertel Rodrigues" <e...@eu.com.br> wrote in message
news:3d22ee86_2@dnews...

Quote
> I don't get myself to convince what is written in Help of Delphi. Do you
> know to Real it differentiates?

> --
> Regards,

> Anderson Haertel Rodrigues
> Brazil - ICQ: 160761625

Re:CDS.ApplyUpdates(-1) x CDS.ApplyUpdates(0)


Thanks all.

--
Regards,

Anderson Haertel Rodrigues
Brazil - ICQ: 160761625

"Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
news:3d230106_2@dnews...

Quote
> As Natalie said, ApplyUpdates(0) is the one to use. There is a thread here
> that might also give you some more information (watch out for url wrap):

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&fram...
Quote
> &th=9f5671e81f3a771a&seekm=3c6d4910_2%40dnews#link4

> --
> Dave Rowntree
> "Anderson Haertel Rodrigues" <e...@eu.com.br> wrote in message
> news:3d22ee86_2@dnews...
> > I don't get myself to convince what is written in Help of Delphi. Do you
> > know to Real it differentiates?

> > --
> > Regards,

> > Anderson Haertel Rodrigues
> > Brazil - ICQ: 160761625

Other Threads