Merge branch 'newMaster2024' of https://git.it.verag.ag/edv/SDL into newMaster2024

This commit is contained in:
2026-02-25 14:49:29 +01:00
2 changed files with 21 additions and 5 deletions

View File

@@ -190,7 +190,7 @@ Public Class cDatenbankAVISO
End If
Return GlobalConnectionFMZOLL
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("Es konnte keine Verbindung zur Datenbank aufgebaut werden!! " & ex.Message, "Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("SQLGUIDE01_USED: " & VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED & " Es konnte keine Verbindung zur Datenbank aufgebaut werden!! " & ex.Message, "Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
' MsgBox("Es konnte keine Verbindung zur Datenbank aufgebaut werden!! " & vbCrLf & vbNewLine & vbCrLf & "Fehler: " & ex.Message)
End Try
Return Nothing

View File

@@ -60,7 +60,8 @@ Public Class SQL
Return My.MySettings.Default.FMZOLL_PRODConnectionString
Catch ex As Exception
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
Return "Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=VERAG;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;"
End Try
End If
@@ -139,10 +140,14 @@ Public Class SQL
Return My.MySettings.Default.FMZOLLConnectionString
Else
Try
If VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED Then
Return My.MySettings.Default.VERAGConnectionStringPROD
End If
Return My.MySettings.Default.FMZOLL_PRODConnectionString
Catch ex As Exception
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
Return "Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=VERAG;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;"
End Try
End If
End Function
@@ -152,6 +157,9 @@ Public Class SQL
Return My.MySettings.Default.AsfinagConnectionStringDEV()
Else
Try
If VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED Then
Return My.MySettings.Default.VERAGConnectionStringPROD
End If
Return My.MySettings.Default.FMZOLL_PRODConnectionString
Catch ex As Exception
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
@@ -297,6 +305,11 @@ Public Class SQL
Public Shared Function GetNewOpenConnectionFMZOLL(Optional pooling As Boolean = True) As SqlConnection
Dim cn As New SqlConnection()
Try
'MsgBox(VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED)
'MsgBox(GetFMZOLLConnectionString())
cn.ConnectionString = GetFMZOLLConnectionString() & IIf(pooling, "", ";pooling=false")
cn.Open()
Return cn
@@ -520,9 +533,12 @@ Public Class SQL
Public Shared Function GetNewOpenConnectionFMZOLLREAL() As SqlConnection
Dim cn As New SqlConnection()
Try
cn.ConnectionString = My.MySettings.Default.FMZOLL_PRODConnectionString
cn.ConnectionString = My.MySettings.Default.VERAGConnectionStringPROD
'cn.ConnectionString = My.MySettings.Default.FMZOLL_PRODConnectionString
cn.Open()
Return cn
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, "SQL CONNECTION | " & cn.ConnectionString.Replace("BmWr501956", "*******").Replace("yp/THDd?xM+pZ$", "*******") & " | Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try