Hi !
I'm trying to use Transactionscope, the problem is even if I don't call
Complete method of the transaction scope, the transaction is commited !
There is only one connection, involved, so i guess its not a problem
relative to MSDTC.
I can't see what I'm doing wrong (I probably missed something big) ...
I try use to use the simplest code possible (sorry, it's vb.net not c#) :
The code with the database can be found here :
http://www.box.net/shared/9qvskearbu
Imports System.Transactions
Imports FirebirdSql.Data.FirebirdClient
Module Module1
Sub Main()
Using trs As TransactionScope = New TransactionScope()
'Transaction exist
Console.WriteLine(Transaction.Current.TransactionInformation.LocalIdentifier)
'Create a new connection (
Dim conn As IDbConnection = New
FbConnection("User=SYSDBA;Password=masterkey;Database=D:\FbTransactionScope\database\test.fdb;DataSource=localhost;Port=3051;Dialect=3;Charset=UTF8;Role=;Connection
lifetime=15;Enlisted=True;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet
Size=8192;ServerType=0;")
conn.Open()
Dim cmd As New FirebirdSql.Data.FirebirdClient.FbCommand
cmd.CommandText = "UPDATE OR INSERT INTO ""Accounts""
(""acc_Id"") VALUES (10);"
cmd.CommandType = CommandType.Text
cmd.Connection = CType(conn,
FirebirdSql.Data.FirebirdClient.FbConnection)
cmd.ExecuteNonQuery()
'the insert is commited after the ExecuteNonQuery ??????
'commented : transaction not completed
'trs.Complete()
'close connection
conn.Close()
conn.Dispose()
End Using
End Sub
End Module
Even if not calling trs.Complete() , the data "10" is inserted, and no
execptions are raised...
I'm using :
WinXpSP2
Framework 2.0
Visual studio 2008
Firebird 2.1
FirebirdSql.Data.FirebirdClient 2.1.0
Thanks for your help !
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider