Cor
Wed Nov 15 12:41:20 CST 2006
The Max, I had some problems with this in past because the updatecommand is
privat so if it does not go, is here the oldmetod which is as well in
sqlclient
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdataoledboledbconnectionclassbegintransactiontopic.asp
However, I thuougth that I solved with casting the tableadapter again to a
dataadapter and than add the transaction to that.
Cor
"TheMaxx" <themaxxREMOVE@net.hr> schreef in bericht
news:ejeiqr$4bv$1@magcargo.vodatel.hr...
> Cor & Ryan, thanx for answers, but i think we are missing a point.
> I am well aware of SqlTransaction object, but how to set the same
> transaction for each TableAdapter?
>
> p.s. this is 2.0, i think TableAdapters were not provided in VS 2003
>
>
>
> "Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
> news:emfnCMHCHHA.4832@TK2MSFTNGP06.phx.gbl...
>> The Max,
>>
>> In 1.x it is in connection. setTransaction in 2.0 there is a Transaction
>> class.
>>
>>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqltransactionclasstopic.asp
>>
>> I hope this helps,
>>
>> Cor
>>
>> "TheMaxx" <themaxxREMOVE@net.hr> schreef in bericht
>> news:ejciit$55$1@magcargo.vodatel.hr...
>>>I have two tables in dataset, and appropriate TableAdapters.
>>>
>>> How can i update both tables, but in transaction?
>>>
>>> I other words:
>>>
>>> THIS:
>>> MyDSTableAdapters.Table1TableAdapter a1 = new ...
>>> MyDSTableAdapters.Table1TableAdapter a2 = new ...
>>>
>>> a1.Update(dt1);
>>> a2.Update(dt2);
>>>
>>> but where to put transaction ?
>>>
>>> P.S. DataSet and TableAdapters are generated via VS 2005 form SQL 2000
>>> ServerExplorer drag n' drop
>>>
>>
>>
>
>