Here is the problem I'm facing.
I'm working on a system where I need to make DataAdapter.Update method
call to update the database. After the update is complete I need to
make a call to an external system. (I know it's not the prettiest
picture but for now I do need to update the database before I make the
external system call, because in our current design our handler that
make external system calls gather this updated information from
different tables in the DB)
The problem is the external system might return an error and I'd need
to roll back my changes to the DB earlier.
I do the update using Update Method in the DataAdapter. It would be
great if I could make DataAdapter not to call AcceptChanges so I can
call RejectChanges on the dataset and update back to the DB. Is there
a way to do this?
Thanks in advance for your help.
Jin
<jka...@hotmail.com> wrote in message
news:64ba1b2.04040...@posting.google.com...
Is that not answering with "Yes there is", what does it not as asked, it
preserves the updates whatever the dataadpater does with it.
:-)))
Cor
Another idea:
Can't you use Distributed Transaction Coordinator in COM+ for this?
--
Joe Fallon
<jka...@hotmail.com> wrote in message
news:64ba1b2.04040...@posting.google.com...
Jin
"Joe Fallon" <jfal...@nospamtwcny.rr.com> wrote in message news:<OsV$yezHEH...@TK2MSFTNGP10.phx.gbl>...
If you want to keep the DataAdapter from implicitly calling
AcceptChanges after submitting the pending changes in a row,
handle the DataAdapter's RowUpdated event and set
RowUpdatedEventArgs to UpdateStatus.SkipCurrentRow.
I hope this information proves helpful.
David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights. You assume all risk for your use.
© 2004 Microsoft Corporation. All rights reserved.
What I suggested was a workaround for this problem.
"Cor Ligthert" <notfir...@planet.nl> wrote in message
news:ON9R96uH...@TK2MSFTNGP11.phx.gbl...
Another thing is that I thought that when you do a update as this
myAdapter.update(dataset.getchanges)
the acceptchanges is not done (was more a problem I once had)
However some time ago, so do not shoot me when I am wrong.
:-)
Cor