By Tiong Diu King - 7/14/2010
Hi all,
Below is my code which fail to rollback. Please advice
Public Sub thread()
Dim locblock As New BOprdyrec
Dim lnnumber As Integer
lnnumber = 1
Try
MicroFour.StrataFrame.Business.BusinessLayer.TransactionBegin("", Data.IsolationLevel.ReadCommitted)
Do While lnnumber > 0
lnnumber = lnnumber + 1
locblock.Add()
locblock.cpdrrefdoc = lnnumber.ToString
locblock.Save()
Loop
MicroFour.StrataFrame.Business.BusinessLayer.TransactionCommit("")
Catch ex As Exception
MicroFour.StrataFrame.Business.BusinessLayer.TransactionRollback("")
End Try
End Sub
|
By Edhy Rijo - 7/14/2010
Hi Tiong,
Look at the StrataFrame documentation under the "Using Transactional Processing" topic for more explanation.
You are missing a parameter in the Save() method to use the transaction:
locblock.Save(True)
One of the nice feature of StrataFrame is that it will allow you to save a BO with or without a transaction at any point.
|
By Tiong Diu King - 7/14/2010
Thanks Edhy Rijo for ur help
|
|