Indicates that either Execute or ExecuteNonQuery have been called and are not going to be called again. If in transaction mode (Transactions.Begin has been called) then the connection is left open until Transactions.Commit or Rollback is called. If not in transaction mode then the connection is closed. Always call Finished when finished using the connection whether in transaction mode or not as the library will close the connection if necessary. If called within a TransactionScope() then the database transaction will be committed at the end of the TransactionScope().

Namespace: DatabaseObjects
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
[ObsoleteAttribute("Use DatabaseObjects.ConnectionScope")]
public void Finished()
Visual Basic
<ObsoleteAttribute("Use DatabaseObjects.ConnectionScope")> _
Public Sub Finished
Visual C++
public:
[ObsoleteAttribute(L"Use DatabaseObjects.ConnectionScope")]
void Finished()

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.

See Also