Below is a short code from an application running against SQL CE 3.5SP1 with LLBLGEN 2.6 using adapter.
I passed a parameter to the call 'testRollback = True' and verified that the roll back was called (I am calling this using COM...) based on the return message.
Yet, the record found itself into the database.
Please help.
Thanks
David
' start the transaction
adapter.StartTransaction(System.Data.IsolationLevel.ReadCommitted, tanscationName)
Try
' check if saving core.
If Not core.Save Then
_saveOutcomeMessage = "Failed saving core."
adapter.Rollback()
Return False
End If
If testRollback Then
_saveOutcomeMessage = "Rolledback core inventory."
adapter.Rollback()
Return False
End If
If adapter.SaveEntity(_entity) Then
adapter.Commit()
Return True
Else
_saveOutcomeMessage = "Failed saving proof."
adapter.Rollback()
Return False
End If
Catch ex As Exception
_saveOutcomeMessage = ex.ToString
adapter.Rollback()
Return False
Finally
adapter.Dispose()
adapter = Nothing
End Try