Database: Fix opening MSSQL connection twice
This commit is contained in:
parent
5fed0a4255
commit
40f0b50ae6
@ -66,8 +66,6 @@ Public Class MSSQLServer
|
||||
Public Function GetConnection() As SqlConnection
|
||||
Try
|
||||
Dim oConnection = GetSQLConnection()
|
||||
OpenSQLConnection(oConnection)
|
||||
|
||||
Return oConnection
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
@ -197,7 +195,7 @@ Public Class MSSQLServer
|
||||
Private Function GetConnection(ConnectionString As String) As SqlConnection
|
||||
Try
|
||||
Dim oConnection As New SqlConnection(ConnectionString)
|
||||
OpenSQLConnection(oConnection)
|
||||
oConnection = OpenSQLConnection(oConnection)
|
||||
|
||||
Dim oMaskedConnectionString = MaskConnectionString(ConnectionString)
|
||||
_Logger.Debug("The Following Connection is open: {0}", oMaskedConnectionString)
|
||||
@ -340,7 +338,7 @@ Public Class MSSQLServer
|
||||
|
||||
|
||||
Public Function GetScalarValue(SQLQuery As String) As Object Implements IDatabase.GetScalarValue
|
||||
Using oConnection = GetSQLConnection()
|
||||
Using oConnection As SqlConnection = GetSQLConnection()
|
||||
Return GetScalarValueWithConnectionObject(SQLQuery, oConnection)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user