DataPortal_Update error - Transactions

DataPortal_Update error - Transactions

Old forum URL: forums.lhotka.net/forums/t/4268.aspx


Inquistive_Mind posted on Thursday, January 31, 2008

Hello,

I have a Parent and Child relationship object where in I am trying to insert a child to the list and I am getting the following error.I am following the example given in Chapter 8 of Expert C# 2005 Business object. Is this because I am opening another connection inside the child Insert method?

DataPortal.Update failed (System.Transactions.TransactionException: The operation is not valid for the state of the transaction. ---> System.TimeoutException: Transaction Timeout
   --- End of inner exception stack trace ---
   at System.Transactions.TransactionState.EnlistPromotableSinglePhase(InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
   at System.Transactions.Transaction.EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
   at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
   at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
   at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
   at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()

Thanks in Advance for your time and suggestions.

Inquistive_Mind replied on Thursday, January 31, 2008

I resolved the issue.I had to enable Network Access on my Local MSDTC and allow Inbound and Outbound communication.

Thanks again

tarekahf replied on Tuesday, February 01, 2011

Thanks a lot for the info. I was able to solve the same problem I am facing, though a bit late Stick out tongue

I followed the steps as per this article:

http://support.microsoft.com/kb/817064

Tarek.

Copyright (c) Marimer LLC