Hello all,,,,,,,,,,,,,,,
I am using a global connection object in Vb6 client server application connecting to SQL server 2000.
I am getting error "No transaction is active.(-2147168242)" on BeginTran.
my connection is like this....->
cn.Open "Driver={SQL Native Client};Server=192.168.1.1;database=temp;uid=sachin;pwd=sachin;Trusted_Connection=yes;"
cn.CursorLocation = adUseClient
and error comes here like --->
Private Function savedata()
sqltemp = 'insert query
cn.BeginTrans
On Error GoTo last
cn.Execute sqltemp, , adExecuteNoRecords
cn.CommitTrans
Exit Function
last:
If Err.Number <> 0 Then
cn.RollbackTrans
MsgBox "Description:- " & Err.Description
End If
End Function
I call this function while click on save button.
If I comment out transaction statement Then it works fine.
But I must have to use Transaction so Someone plz help me.
Sachin
---------------------------------
Never miss a thing. Make Yahoo your homepage.
[Non-text portions of this message have been removed]
.