Here we see an
example of creating a transaction. After we get the DataBase, we declare a
transaction named trans. It is created using the StartTransaction method of
the TransactionManager of that Database. A transaction has a Commit method
that we use if everything went fine. If there was a problem we will call the
Abort method. Always remember to explicitly dispose the Transaction. This is
often done in the finally block of a Try Catch block. |