Re: Transaction Support in Access
- From: "Graham R Seach" <gseach@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 6 Jan 2007 22:49:00 +1100
Rahul,
You might be better to use automatic transaction processing.
Imports System.EnterpriseServices
<Transaction(TransactionOption.RequiresNew)> _
Public Class myClass
<AutoComplete(True)> _
Public Sub myProcedure()
..........
Using declarative transaction processing relieves you of the burden of
managing them in code. I'm certainly no DotNet expert, so I recommend you
ask this question in the appropriate VB DotNet newsgroups.
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
"Rahul" <Rahul@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:485795DC-739B-41E4-BE15-48C477AC01AB@xxxxxxxxxxxxxxxx
I am using VB.NET 2005 to program a Database Application, with Access 2003
as
the DB backend.
Every now & then, I have to make a series of updates to the tables as a
result of user actions. Either all of these updates should be performed or
none of them should be applied to the database.
ADO.NET provides transactions fo the purpose. So, I create OleDB commands
for each update.
Now, the problem is that when I set the command's Transaction property as:
command.Transaction=tx
and later try to commit or rollback the transaction using,
tx.Commit or
tx.Rollback
It gives me an exception saying that the transaction has already closed.
If I dont commit but simply set the command's transaction property, then
none of the update is applied to the database, even when no exception is
generated.
What is the solution to my problem????
.
- Prev by Date: Comparing telephone numbers
- Next by Date: Re: Comparing telephone numbers
- Previous by thread: Comparing telephone numbers
- Next by thread: Re: Combo Box and SQL
- Index(es):
Relevant Pages
|