How do I check if System.Data.SqlClient.SqlTransaction has an active transaction?
<p>I have a method which I use to execute all my SQL queries (inserts, updates, delete) and I want to put a check in to make sure the change is within a transaction before the code is executed but I can't find a property against the <code>SqlTransaction</code> to check for.</p>

<p>How should I proceed?</p>

<p>Note: I am using <code>FDBConnection.BeginTransaction("MY_TRANS");</code> to begin the transaction and standard rollback and commnit methods</p>

<p>Using .NET 4.0 with VS 2010 Web Dev Express.</p>
