You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When auto-enlistment is enabled, opening a Firebird connection without an ongoing ambient system transaction fails with error:
System.InvalidOperationException : There is no active TransactionScope to enlist transactions.
Quite self explanatory. But this behavior is exclusive to Firebird and quite unexpected for users of other database connections, and also unexpected according to MSDN about auto-enlistment:
> A connection object will automatically enlist in an existing distributed transaction if it determines that a transaction is active, which, in System.Transaction terms, means that Transaction.Current is not null. Automatic transaction enlistment occurs when the connection is opened. It will not happen after that even if a command is executed inside of a transaction scope.
Usually, enabling auto-enlistment does not mandate an active transaction for opening connection. The connection simply does not enlist to anything when opened if there are no active transaction at that time. (Thankfully, since most other db connections have auto-enlistment enabled by default.)
For reference, here is the list of other connections which I have tested and support opening with auto-enlistment enabled and lack of ambient transaction: SqlConnection, SQLiteConnection, SqlCeConnection, OdbcConnection, OracleConnection (managed & unmanaged), NpgsqlConnection, MySqlConnection.
Submitted by: Frédéric Delaporte (fredericdelaporte)
Block progress on DNET765
Jira_subtask_inward DNET791
When auto-enlistment is enabled, opening a Firebird connection without an ongoing ambient system transaction fails with error:
System.InvalidOperationException : There is no active TransactionScope to enlist transactions.
Quite self explanatory. But this behavior is exclusive to Firebird and quite unexpected for users of other database connections, and also unexpected according to MSDN about auto-enlistment:
> A connection object will automatically enlist in an existing distributed transaction if it determines that a transaction is active, which, in System.Transaction terms, means that Transaction.Current is not null. Automatic transaction enlistment occurs when the connection is opened. It will not happen after that even if a command is executed inside of a transaction scope.
https://msdn.microsoft.com/en-us/library/ms254973(v=vs.110).aspx#Anchor_1
Usually, enabling auto-enlistment does not mandate an active transaction for opening connection. The connection simply does not enlist to anything when opened if there are no active transaction at that time. (Thankfully, since most other db connections have auto-enlistment enabled by default.)
For reference, here is the list of other connections which I have tested and support opening with auto-enlistment enabled and lack of ambient transaction: SqlConnection, SQLiteConnection, SqlCeConnection, OdbcConnection, OracleConnection (managed & unmanaged), NpgsqlConnection, MySqlConnection.
Commits: 3ce7a82
The text was updated successfully, but these errors were encountered: