If I have my SQL code inside a stored proc and I want the store proc to execute within a transaction; does setting the autocommit to false achieve this or do I need to do a BEGIN TRANSACTION/END TRANSACTION within the stored proc. Another related question is that I've set the isolation level to "Serializable" in the connection object. Is this enough to achieve the above ? Thanks Pho
posted 13 years ago
As long as autocommit is off, then you don't need begin / end transaction in your stored proc. The database will get your drift and wrap it all in one transaction with your other DB operations.
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.