|
From: Ricard <ri...@ga...> - 2005-04-04 08:16:13
|
Hello !
I submitted a patch some time ago about Transactions in adp.
I made another little modification in order to make them work in access
databases:
--- adp-0.9.4-orig/src/AdpConnection.cs 2004-10-26 16:24:44.000000000
+0200
+++ adp-0.9.4/src/AdpConnection.cs 2004-12-28 10:27:47.531250000 +0100
@@ -161,7 +161,7 @@
/// <returns>A interface to <see cref='IDbTransaction'/>.</returns>
IDbTransaction System.Data.IDbConnection.BeginTransaction()
{
- return
((IDbConnection)this).BeginTransaction(IsolationLevel.Unspecified);
+ return
((IDbConnection)this).BeginTransaction(IsolationLevel.ReadCommitted);
}
/// <summary>
the problem is that MS Access doesn't accept IsolationLevel.Unspecified.
I don't know if there's a proper way to detect MS Access databases and
act accordingly. But just in case someone faces the same problem, here's
the solution.
En/na Everaldo Canuto ha escrit:
>Olá Ricard,
>
>Thanks for your patch, I will include it today :)
>For the next days I have plan to release a new version with a lot of new
>resources. Wait and you will see :)
>
>If you have any problem with ADP feel free to contact me, I like to see
>your experience with ADP.
>
>Thanks,
>Everaldo.
>
>
>Em Qui, 2004-12-30 às 09:19 +0100, Ricard escreveu:
>
>
>>Hello!
>>
>>After all, "obrigado" for this piece of software.
>>
>>I sent a patch to make it even better.
>> http://sourceforge.net/tracker/index.php?
>>func=detail&aid=1092088&group_id=114652&atid=669036
>>
>>It solves a little problem with transactions.
>>
>>Regards.
>>
>>
>>______________________________________________________________________
>>
>>
>>I think there's a bug in the AdpCommand constructor
>>that prevents transactions to work properly.
>>
>>The constructor that works is :
>>public AdpCommand(string cmdText, AdpConnection connection, AdpTransaction transaction)
>>{
>>this.Connection = connection;
>>this.Transaction = transaction;
>>this.CommandText = cmdText;
>>}
>>
>>
>>
>>
>>Note that I use "this.Connection" not "this.connection" and
>>"this.Transaction" not "this.transaction" to initialize the variables
>>properly.
>>
>>
>>
>>
>>
>
>
>
|