Transactions on Forms


Author
Message
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I have a requirement to use transactions on one of my entry forms. Note: I am not using the MaintnenaceFormToolStrip. I have three business objects on a form and some of the fields are bound to controls etc... Pretty standard form.

Do I simply start the transaction in the FORM 'BeforeSave' event on the Form and then commit the transaction in the FORM 'AfterSave' event?

Any assistance would be appeciated.

Thanks,

Tim

Replies
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Thanks for the help guys, I was able to get things working except for handling of broken rules. Using the example, what if there were broken rules on the orders table - Me.Orders.Save(True) after the transaction was started.  Would you first check all for broken rules on all business objects before calling 'SaveAllOnTransaction' or check the status of each save within the transactions and perform a rollback if a broken rule is found?  At first I thought it would be pretty simple to implement transactions at the form level but I lost some of the power of StataFrame with form level events etc...

Let me know if I'm missing the ball on this or if you have any suggestions on how to handle broken rules etc.. when using transactions.

Thanks

Tim

Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Just wondering if I'm headed in the right direction dealing with Transactions within forms. Any input would be appreciated.
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