Commit vor Firebird entfernen
This commit is contained in:
@@ -75,7 +75,7 @@ Public Class MSSQLServer
|
||||
''' <summary>
|
||||
''' Decrypts a connection string password.
|
||||
''' </summary>
|
||||
''' <param name="pConnectionString">A connection string with a encrypted password</param>
|
||||
''' <param name="pConnectionString">A connection string with an encrypted password</param>
|
||||
''' <returns>The connection string with the password decrypted.</returns>
|
||||
<DebuggerStepThrough()>
|
||||
Public Shared Function DecryptConnectionString(pConnectionString As String) As String
|
||||
@@ -87,6 +87,11 @@ Public Class MSSQLServer
|
||||
Return oBuilder.ToString()
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
Private Function IDatabase_DecryptConnectionString(pConnectionString As String) As String Implements IDatabase.DecryptConnectionString
|
||||
Return DecryptConnectionString(pConnectionString)
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
Public Function GetConnectionString(Server As String, Database As String, UserId As String, Password As String) As String
|
||||
Dim oConnectionStringBuilder As New SqlConnectionStringBuilder() With {
|
||||
@@ -146,7 +151,7 @@ Public Class MSSQLServer
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Function GetConnectionStringForId(pConnectionId As Integer) As String
|
||||
Public Function GetConnectionStringForId(pConnectionId As Integer) As String Implements IDatabase.GetConnectionStringForId
|
||||
Return Get_ConnectionStringforID(pConnectionId)
|
||||
End Function
|
||||
Public Function GetGDPictureString() As String
|
||||
@@ -194,14 +199,6 @@ Public Class MSSQLServer
|
||||
Else
|
||||
oConnectionString = $"Server={oServer};Database={oDatabase};User Id={oUser};Password={oPassword};"
|
||||
End If
|
||||
|
||||
Case "ORACLE"
|
||||
If oRow.Item("BEMERKUNG").ToString.Contains("without tnsnames") Then
|
||||
oConnectionString = $"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={oServer})(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={oDatabase})));User Id={oUser};Password={oPassword};"
|
||||
Else
|
||||
oConnectionString = $"Data Source={oServer};Persist Security Info=True;User Id={oUser};Password={oPassword};Unicode=True"
|
||||
End If
|
||||
|
||||
Case Else
|
||||
Logger.Warn("Provider [{0}] not supported!", oProvider)
|
||||
|
||||
@@ -213,7 +210,7 @@ Public Class MSSQLServer
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn("Error in Get_ConnectionStringforID")
|
||||
Logger.Warn("Error in Get_ConnectionStringforID (MSSQLServer.VB)")
|
||||
End Try
|
||||
|
||||
Return DecryptConnectionString(oConnectionString)
|
||||
|
||||
Reference in New Issue
Block a user