Transaction Problem


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Glad to heard that. Good luck!

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Great. Smile
dgsoft
dgsoft
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Yes.. the problem was - I use only 2 parameters in the TransactionBegin DataSourceKey and IsolationLevel.. now when I use another method overload - it works perfect!

Problem is solved!

Thank you!
dgsoft
dgsoft
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
You are right!

The problem was in TransactionBegin() method. When I send 3 parameters DataSourceKey, TransactionKey and IsolationLevel - now all works perfect!

Thank you for Help!



Denis
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Try Edhy's sample...that should work.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
dgsoft (06/01/2009)
Hi, in my case its DataSourceKey.. I will try to check it with another constructur..




Try this:



Try

BusinessLayer.TransactionBegin("PENSOLUTIONOFFICE","MyTransationKey", Data.IsolationLevel.ReadCommitted)

mmks_UpdateSFSUsers(loSFSUserBO)



lSaveResult = loSFSUserBO.Save(True, MyTransationKey")



Edhy Rijo

dgsoft
dgsoft
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi, in my case its DataSourceKey.. I will try to check it with another constructur..
dgsoft
dgsoft
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hmm. but when I add second parameter.. I not able to save the data because an error happen



"An error occurred while saving the data to the server."



[code]



Dim loSFSUserBO As MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO = New MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO()

If llNewUser Then

loSFSUserBO.Add()

Else

loSFSUserBO.FillByPrimaryKey(pmks_SFSUserId)

End If





Try

BusinessLayer.TransactionBegin("PENSOLUTIONOFFICE", Data.IsolationLevel.ReadCommitted)

mmks_UpdateSFSUsers(loSFSUserBO)



lSaveResult = loSFSUserBO.Save(True, "PENSOLUTIONOFFICE")



[code]



IsDirty = true here.. and on Save line I have an exception..
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Denis,



The BO.TransactionBegin() has 2 constructors, I use the 2nd one with 3 parameters, DataSourKey, TransactionKey and IsoLevel, the main one for me is the TransactionKey which I also used as the 2nd parameter of my Save(True, TransactionKey). In your case I don't know if "PENSOLUTIONOFFICE" is the DataSourceKey or the TransactionKey, so pass the TransactionKey to the Save() and you should be fine.




Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You did not tell the BO to save on the transaction that you created. You can start more than one transaction session and save each BO in a different transaction if you had that need. But in your case, you created the transaction then did not tell the BO to save on that transaction.



loPSOClients.Save(True, "PENSOLUTIONOFFICE")




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search