RE: HOW TO: Implement transaction in TableAdapter class
- From: v-kevy@xxxxxxxxxxxxxxxxxxxx (Kevin Yu [MSFT])
- Date: Thu, 12 Jan 2006 01:46:05 GMT
Hi Sengai,
The TableAdapter will not generate code that implements a transaction by
default. If you wish to make the TableAdapter commit a transaction to the
database, you have to add SQL script yourself. The simplest way is to put
BEGIN TRANSACTION, COMMIT TRANSACTION, or ROLLBACK TRANSACTION in the
stored procedure. If you want to perform transactions between TableAdapters
in or not in the same server, you can also use Distributed Transactions.
Please check the following article for more information on it.
http://msdn2.microsoft.com/en-us/library/777e5ebh.aspx
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
.
- Prev by Date: Re: Opening Stored Procedure...copying to local table...any faster way to do this?
- Next by Date: Re: MySQL ADO
- Previous by thread: Opening Stored Procedure...copying to local table...any faster way to do this?
- Next by thread: Using Resync with ADO and complex SQL Query statement using left outer joins
- Index(es):
Relevant Pages
- RE: Visual Studio 2008 TableAdapters and Transactions
... As for the "Transaction" property of the VS generated TableAdapter, ...
As you can see, when you set its value, it will update all the Command ... Microsoft
MSDN Online Support Lead ... (microsoft.public.dotnet.framework.aspnet) - Re: Strongly typed dataset and transactions
... The problem is that the automatically generated TableAdapter from the xsd ...
to the InsertCommand, so you cannot set its transaction! ... I am using VB.NET to
write to an Access database, ... (microsoft.public.dotnet.framework.adonet) - Transactions + multiple table adapters
... with two DataTables each having a TableAdapter. ... use the insert command
on the first TableAdapter and then execute a stored ... procedure on the second table adapter
- all within a transaction. ... Problem is that each TableAdapter uses it's own connection.
... (microsoft.public.dotnet.framework.adonet) - Re: TableAdapter with Transactions
... bet is to simply open the connection, wrap it in a TransactionScope and run ...
sure your transaction isn't promoting the MSDTC. ... SqlTransaction TableAdapter.BeginTransaction
... This way, you can use the TableAdapter to start/end transactions, and ENSURE ...
(microsoft.public.dotnet.framework.adonet) - Re: TableAdapter with Transactions
... > a) If you are using Sql Server 2005, and *only one* connection, your best ...
> make sure your transaction isn't promoting the MSDTC. ... > TableAdapter
and add a BeginTransaction method on the table adapter ... > SqlTransaction TableAdapter.BeginTransaction
... (microsoft.public.dotnet.framework.adonet)