diff --git a/Modules.Database/Firebird.vb b/Modules.Database/Firebird.vb
index 6b1d1bec..df64e43d 100644
--- a/Modules.Database/Firebird.vb
+++ b/Modules.Database/Firebird.vb
@@ -225,11 +225,20 @@ Public Class Firebird
''' The command to execute
''' True, if command was executed sucessfully. Otherwise false.
Public Function ExecuteNonQuery(SqlCommand As String) As Boolean
- Dim oConnection As FbConnection = GetConnection()
- Dim oScalarValue As Object = ExecuteNonQueryWithConnection(SqlCommand, oConnection)
- oConnection.Close()
+ Using oConnection As FbConnection = GetConnection()
+ Return ExecuteNonQueryWithConnection(SqlCommand, oConnection)
+ End Using
+ End Function
- Return oScalarValue
+ '''
+ ''' Executes a non-query command inside the specified transaction.
+ '''
+ ''' The command to execute
+ ''' True, if command was executed sucessfully. Otherwise false.
+ Public Function ExecuteNonQuery(SqlCommand As String, Transaction As FbTransaction) As Boolean
+ Using oConnection As FbConnection = GetConnection()
+ Return ExecuteNonQueryWithConnection(SqlCommand, oConnection, TransactionMode.ExternalTransaction, Transaction)
+ End Using
End Function
'''