>Hello all
>
>I am using transactions in a FORM and i am getting the following error message :
>
>Data session #number cannot be released with open transaction(s) (Error 1549)
>
>The VFP help is as follow :
>
>A data session-based object is being closed while there are open transactions. The data session will remain active.
>Close the data session by issuing SET DATASESSION TO number followed by the appropriate number of END TRANSACTION or ROLLBACK commands
>
>
>Note : i never change the default datasession on my form is always "default"
>
>Can anybody help me with the above error?
>
>Thanks in advance
>Peter
Petros,
At least one of the transactions you started didn't have a corresponding 'Rollback' or 'end transaction' command. It might also a result of your debugging :
-Started the form
-Got to 'begin transaction'
-Had an error and cancelled to correct (transaction is still open)
? txnlevel()
Issue series of rollback till txnlevel() is 0 or if you don't check it VFP would show a message something like 'Not in a transaction' when it reaches to 0.
Cetin