Thanks for your information.
I tried:
using (TransactionScope ts = new TransactionScope())
{
mds.UpdateTable1();
mds.UpdateTable2();
mds.UpdateTable3();
}
And got:
The transaction manager has disabled its support for remote/network
transactions.
Without the TransactionScope it worked fine. But the TransactionScope
causes the error above. I guess I have to change some settings on the
server, haven't I? Which ones and where?
Would this also work with non MS-SQl 2005 servers?
Do I have other possibilities? E.g. creating a new delta DataSet using
getChanges() and putting another connection into it? But how would I do
that?
And what is getChanges() good for in general? Wouldn't a Table.Update()
automatically "call" getChanges() and just update the modified rows?
The journey is the reward.
Joe
Joe,
See inline:
> The transaction manager has disabled its support for remote/network
> transactions.
[quoted text clipped - 3 lines]
> server, haven't I? Which ones and where?
> Would this also work with non MS-SQl 2005 servers?
Without TransactionScope, it worked, but if you had an error on the
second update, none of the work would be rolled back. The
TransactionManager would most likely not work with non MS SQL Server 2005
installations since you would have to have DTC running on both machines to
handle the coordination of the distributed transaction.
> Do I have other possibilities? E.g. creating a new delta DataSet using
> getChanges() and putting another connection into it? But how would I do
> that?
You could manage the transaction yourself, by calling BeginTransaction
on the connection. However, depending on your needs for transaction based
processing, this can get very unwieldy very quickly (especially if you have
multiple calls you need to handle in the transaction, you would have to pass
the transaction object everywhere).
GetChanges is only going to give you the changes that occured in the
datatable, nothing more. Using another connection to process it isn't going
to help.
> And what is getChanges() good for in general? Wouldn't a Table.Update()
> automatically "call" getChanges() and just update the modified rows?
The Update method on the DataAdapter is going to cycle through the rows
and if there is a changed state for a row, it is going to process it.
However, AFAIK, it does not call GetChanges to only get changed rows.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> The journey is the reward.
>
[quoted text clipped - 19 lines]
>>
>> Hope this helps.
Joe Kovac - 14 May 2007 07:17 GMT
> Joe,
>
[quoted text clipped - 23 lines]
> multiple calls you need to handle in the transaction, you would have to pass
> the transaction object everywhere).
Well, I tried to handle the transactions myself. I followed the template
provided at:
http://weblogs.asp.net/ryanw/archive/2006/03/30/441529.aspx
Unfortunately I got following error:
"ExecuteReader requires the command to have a transaction when the
connection assigned to the command is in a pending local transaction.
The Transaction property of the command has not been initialized."
How can I fix that? (Or is there another easy way to implement
transactions within datasets without DTC?)
> GetChanges is only going to give you the changes that occured in the
> datatable, nothing more. Using another connection to process it isn't going
[quoted text clipped - 6 lines]
> and if there is a changed state for a row, it is going to process it.
> However, AFAIK, it does not call GetChanges to only get changed rows.
Joe Kovac - 14 May 2007 08:39 GMT
>> Joe,
>>
[quoted text clipped - 38 lines]
> How can I fix that? (Or is there another easy way to implement
> transactions within datasets without DTC?)
According to another news group entry it might never be possible to use
a transaction by hand:
# "Figured it out. The TableAdapterHelper sets all the commands
# transactions... but the .Update() command doesn't use an existing
# command, it dynamically builds one. This, of course, means that the
# transaction is not set on that command. So I'm using manual SQL
# statements instead of Update. "
If I am (hopefully!) wrong, how to do the transaction handling exactly?
>> GetChanges is only going to give you the changes that occured in
>> the datatable, nothing more. Using another connection to process it
[quoted text clipped - 7 lines]
>> rows and if there is a changed state for a row, it is going to process
>> it. However, AFAIK, it does not call GetChanges to only get changed rows.
Joe Kovac - 16 May 2007 06:30 GMT
>>> You could manage the transaction yourself, by calling
>>> BeginTransaction on the connection. However, depending on your needs
[quoted text clipped - 27 lines]
>
> If I am (hopefully!) wrong, how to do the transaction handling exactly?
Anyone???