HighTechTalks DotNet Forums  

Transaction has already been implicitly or explicitly committed or aborted

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Transaction has already been implicitly or explicitly committed or aborted in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Rodrigo Batres
 
Posts: n/a

Default Transaction has already been implicitly or explicitly committed or aborted - 07-30-2003 , 08:49 PM






I´ve got a problem. I´ve got 2 C# managed objects in COM+. Both JIT, Pooled,
AutoComplete. One of them is TxSupported and has a method that acceses a DB.
The other is TxRequiresNew and calls the TxSupported object. The TxSupported
object creates and initializes a new SqlConnection during the method call,
uses it, and closes and disposes the connection. The trouble is that
Connection.Open() throws an Exception saying that the transaction has
already been commited or aborted.

I suppose this means that when the SqlConnection tries to enroll in the
current transaction it finds it has already been commited or aborted. But I
don´t understand why, since SqlConnection.Open() is practically the first
action during the transaction and I´m creating an entirely new connection.
It shouldn´t have any trouble.

I´d really appreciate it if somebody would shed some light on this.

I´m running XP Pro SP1, .NET Framework 1.1
Here´s my connection string: "user id=sa;password=;initial
catalog=Tauro;data source=nibble;Enlist=true;Pooling=false"
I turned off object pooling just to eliminate some possibilities.

Anyway, here´s the server stack trace:
System.Runtime.InteropServices.COMException (0x8004D00E): The transaction
has already been implicitly or explicitly committed or aborted

Server stack trace:
at System.Data.Common.ITransactionExport.Export(ITran saction transaction,
UInt32& transactionCookie)
at System.Data.SqlClient.Transaction.GetTransactionCo okie(Byte[] dtcAddr,
ITransaction transaction, ITransactionExport& transactionExport, Byte[]&
cookie, Int32& length)
at
System.Data.SqlClient.SqlInternalConnection.Enlist NonNullDistributedTransact
ion(ITransaction transaction)
at
System.Data.SqlClient.SqlInternalConnection.Enlist DistributedTransaction(ITr
ansaction newTransaction, Guid newTransactionGuid)
at
System.Data.SqlClient.SqlInternalConnection.Enlist DistributedTransaction()
at System.Data.SqlClient.SqlInternalConnection..ctor( SqlConnection
connection, SqlConnectionString connectionOptions)
at System.Data.SqlClient.SqlConnection.Open()
at Sedsa.Erp.Framework.DataAccess.Users.List(String sysCveUser,
DataTable& dto, Boolean log)
at System.Runtime.Remoting.Messaging.Message.Dispatch (Object target,
Boolean fExecuteInContext)
at
System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at Sedsa.Erp.Framework.DataAccess.Users.List(String sysCveUser,
DataTable& dto, Boolean log)
at BLUsersTest.BLUsers.SomeShit()
at
System.Runtime.Remoting.Messaging.StackBuilderSink .PrivateProcessMessage(Met
hodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at BLUsersTest.BLUsers.SomeShit()
at ComponentServicesTester.Form1.calluserslistButton_ Click(Object sender,
EventArgs e) in d:\documents and settings\kirkpatrick\my documents\visual
studio projects\componentservicestester\form1.cs:line 339
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)




Reply With Quote
  #2  
Old   
Ice
 
Posts: n/a

Default Re: Transaction has already been implicitly or explicitly committed or aborted - 08-05-2003 , 10:54 AM






what do you mean not correctly configured? what was the configuration?

ice
"Rodrigo Batres" <rbatres (AT) sedsa (DOT) com> wrote

Quote:
Network settings were not correctly configured for MSDTC on the server
where
my DB is. My bad.

"Rodrigo Batres" <rbatres (AT) sedsa (DOT) com> wrote in message
news:ed6JASvVDHA.2004 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I´ve got a problem. I´ve got 2 C# managed objects in COM+. Both JIT,
Pooled,
AutoComplete. One of them is TxSupported and has a method that acceses a
DB.
The other is TxRequiresNew and calls the TxSupported object. The
TxSupported
object creates and initializes a new SqlConnection during the method
call,
uses it, and closes and disposes the connection. The trouble is that
Connection.Open() throws an Exception saying that the transaction has
already been commited or aborted.

I suppose this means that when the SqlConnection tries to enroll in the
current transaction it finds it has already been commited or aborted.
But
I
don´t understand why, since SqlConnection.Open() is practically the
first
action during the transaction and I´m creating an entirely new
connection.
It shouldn´t have any trouble.

I´d really appreciate it if somebody would shed some light on this.

I´m running XP Pro SP1, .NET Framework 1.1
Here´s my connection string: "user id=sa;password=;initial
catalog=Tauro;data source=nibble;Enlist=true;Pooling=false"
I turned off object pooling just to eliminate some possibilities.

Anyway, here´s the server stack trace:
System.Runtime.InteropServices.COMException (0x8004D00E): The
transaction
has already been implicitly or explicitly committed or aborted

Server stack trace:
at System.Data.Common.ITransactionExport.Export(ITran saction
transaction,
UInt32& transactionCookie)
at System.Data.SqlClient.Transaction.GetTransactionCo okie(Byte[]
dtcAddr,
ITransaction transaction, ITransactionExport& transactionExport, Byte[]&
cookie, Int32& length)
at


System.Data.SqlClient.SqlInternalConnection.Enlist NonNullDistributedTransact
ion(ITransaction transaction)
at


System.Data.SqlClient.SqlInternalConnection.Enlist DistributedTransaction(ITr
ansaction newTransaction, Guid newTransactionGuid)
at

System.Data.SqlClient.SqlInternalConnection.Enlist DistributedTransaction()
at System.Data.SqlClient.SqlInternalConnection..ctor( SqlConnection
connection, SqlConnectionString connectionOptions)
at System.Data.SqlClient.SqlConnection.Open()
at Sedsa.Erp.Framework.DataAccess.Users.List(String sysCveUser,
DataTable& dto, Boolean log)
at System.Runtime.Remoting.Messaging.Message.Dispatch (Object target,
Boolean fExecuteInContext)
at


System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at Sedsa.Erp.Framework.DataAccess.Users.List(String sysCveUser,
DataTable& dto, Boolean log)
at BLUsersTest.BLUsers.SomeShit()
at


System.Runtime.Remoting.Messaging.StackBuilderSink .PrivateProcessMessage(Met
hodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at


System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [1]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at BLUsersTest.BLUsers.SomeShit()
at ComponentServicesTester.Form1.calluserslistButton_ Click(Object
sender,
EventArgs e) in d:\documents and settings\kirkpatrick\my
documents\visual
studio projects\componentservicestester\form1.cs:line 339
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)








Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.