Yes I need some more info
What is the code for "GetConnection"
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> Here is the code,
>
>
> Public Sub Insert(ByVal drNewRow As DataRow, _
> ByVal myconnection as sqlconnection, _
> ByVal mytransaction as sqlTransaction)
> .....
> daData.InsertCommand.Connection = myConnection
> daData.InsertCommand.Transaction = myTransaction
> daData.Update(dsData, myTable)
>
> Catch ex As Exception
>
> Dim newdbobject = New DBUtility
> newdbobject.LogError(ex, myUserID)
>
>
> Finally
> ........
>
> End Sub
>
>
>
>
> Public Sub LogError(ByVal ex As Exception, _
> ByVal userID As Long)
> ...
> Try
> myConnection1 = GetConnection()
> myConnection1.Open()
>
> cmdSelectData1.CommandText = "select * from Table"
> cmdSelectData1.CommandType = CommandType.Text
> cmdSelectData1.Connection = myConnection1
>
> **Cannot create a new transaction and use BeginTransaction on this
> connection
>
> drRow1 = dsData1.Tables("ExceptionLog").NewRow
> ...
> dsData1.Tables("ExceptionLog").Rows.Add(drRow1)
> ..
> daData1.InsertCommand.Connection = myConnection1
> **Cannot bind the insert command to local transaction. Parent method
> rollback also rolls this insert back
>
> daData1.Update(dsData1, "ESYSExceptionLog")
>
> Catch exp As Exception
> ....
> Finally
> myConnection1.Close()
>
> End Try
> End Sub
>
>
> Please let me know if you need additional information.
>