Indicates that either Execute or ExecuteNonQuery is going to be used
and that a connection needs to be opened if one is not already.
If in transaction mode (Transactions.Begin has been called) then the
current connection is left opened.
If not in transaction mode then a new connection is opened.
Always call Start before using Execute or ExecuteNonQuery whether in
transaction mode or not as the library will open the connection if necessary.
Once the connection is no longer required, call Database.Connection.Finished()
or Database.Transactions.Commit().
If called within a TransactionScope() then a database transaction is automatically started.
Namespace: DatabaseObjectsAssembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0
Syntax
C# |
---|
[ObsoleteAttribute("Use DatabaseObjects.ConnectionScope")] public void Start() |
Visual Basic |
---|
<ObsoleteAttribute("Use DatabaseObjects.ConnectionScope")> _ Public Sub Start |
Visual C++ |
---|
public: [ObsoleteAttribute(L"Use DatabaseObjects.ConnectionScope")] void Start() |
Remarks
This feature is particularly relevant when database records are locked
during transactions. If a second connection outside of the DatabaseObjects
library is used then a possible deadlock could occur. Using the Execute
and ExecuteNonQuery functions means that a new connection is opened if not
in transaction mode or the current transaction connection is used - thereby
avoiding potential deadlocks.