J
Jerry H.
I know that sounds like a lame and newbie kind of question, because I
understand what the effect is - but I'd really like to know what
Microsoft's thinking behind this method is about.
For example, I can pull ten rows from a datasource into a dataset,
modify the contents of a few rows and then send the changes back to
the original datasource using the Update method of an adapter. But if
I call AcceptChanges manually prior to the Update method, then there
are no changes available in the dataset for the adapter to send back.
What is the reason for this behavior? Under what circumstances would
I want to call AcceptChanges manually anyway, if I know that I will
send changes back to the original database later on?
As I understand it, a Datatable can have 3 versions of a field:
Original, Current and Pending. I believe AcceptChanges "pushes" the
Pending values into the Current values, whereas the Original values
reflect the last known state of data from the datasource.
It seems to me, that if I have data that has been updated on the
dataset, why wouldn't the Update method of the adapter see that
automatically and send back the changes?
I know I am missing something simple that should help fill in my gaps
of ADO.NET, please help a coda out!
understand what the effect is - but I'd really like to know what
Microsoft's thinking behind this method is about.
For example, I can pull ten rows from a datasource into a dataset,
modify the contents of a few rows and then send the changes back to
the original datasource using the Update method of an adapter. But if
I call AcceptChanges manually prior to the Update method, then there
are no changes available in the dataset for the adapter to send back.
What is the reason for this behavior? Under what circumstances would
I want to call AcceptChanges manually anyway, if I know that I will
send changes back to the original database later on?
As I understand it, a Datatable can have 3 versions of a field:
Original, Current and Pending. I believe AcceptChanges "pushes" the
Pending values into the Current values, whereas the Original values
reflect the last known state of data from the datasource.
It seems to me, that if I have data that has been updated on the
dataset, why wouldn't the Update method of the adapter see that
automatically and send back the changes?
I know I am missing something simple that should help fill in my gaps
of ADO.NET, please help a coda out!