Please always research for a solution yourself before submitting a question here.
By the way, please also use exclamation points sparingly: If you choose to use an exclamation point, use only one to convey excitement... “People sometimes get carried away and put a number of exclamation points at the end of their sentences. The result can appear too emotional or immature,” she writes. “Exclamation points should be used sparingly in writing.”
Automatic transactions were eliminated several years ago.
Here is an eight years old discussion recommending you to avoid using it:
https://thebuildingcoder.typepad.com/blog/2012/05/read-only-and-automatic-transaction-modes.html
Sorry that they still appear in the sample code you found. It is apparently outdated.
Here are several suggestions on how to manage manual transactions:
https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.53
The simplest and most important recommendation is to keep it simple and encapsulate your manually managed transaction in a `using` statement:
https://thebuildingcoder.typepad.com/blog/2012/04/using-using-automagically-disposes-and-rolls-back....
I hope this helps.
Best regards,
Jeremy