error message help needed

  • Thread starter Thread starter TJS
  • Start date Start date
T

TJS

how to resolve this ?

error msg:
=================
"System.Data.SqlClient.SqlException: Distributed transaction completed.
Either enlist this session in a new transaction or the NULL transaction."


code:
===========
....
myConnection.Open()
Dim tran As SqlTransaction = myConnection.BeginTransaction()
Try
tran = myConnection.BeginTransaction()
cmdInsert.Transaction = tran
cmdInsert.ExecuteNonQuery()
tran.Commit()
Catch ex as Exception
tran.Rollback()
Finally
myConnection.Close()
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top