MS Globix DLL ControlCreator
This commit is contained in:
@@ -57,6 +57,47 @@ Module ModuleHelpers
|
||||
Dim oSQL = "select * from TBGI_FUNCTION_REGEX"
|
||||
My.Application.Globix.DT_FUNCTION_REGEX = clsDataASorDB.GetDatatable("DD_ECM", oSQL, "TBGI_FUNCTION_REGEX", "", "")
|
||||
End Sub
|
||||
Public Function GetConnectionString(id As Integer)
|
||||
Dim connectionString As String = ""
|
||||
Try
|
||||
Dim oSQL = "SELECT * FROM TBDD_CONNECTION WHERE GUID = " & id
|
||||
Dim DTConnection As DataTable = clsDataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_CONNECTION", "GUID = " & id, "")
|
||||
If DTConnection.Rows.Count = 1 Then
|
||||
Dim CSType = DTConnection.Rows(0).Item("SQL_PROVIDER").ToString.ToUpper
|
||||
Select Case CSType
|
||||
Case "MS-SQL".ToUpper
|
||||
If DTConnection.Rows(0).Item("USERNAME").ToString.ToLower = "winauth" Then
|
||||
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Initial Catalog= " & DTConnection.Rows(0).Item("DATENBANK") & ";Trusted_Connection=True;"
|
||||
Else
|
||||
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Initial Catalog= " & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||
End If
|
||||
Case "MS-SQLServer".ToUpper
|
||||
If DTConnection.Rows(0).Item("USERNAME").ToString.ToLower = "winauth" Then
|
||||
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Initial Catalog= " & DTConnection.Rows(0).Item("DATENBANK") & ";Trusted_Connection=True;"
|
||||
Else
|
||||
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Initial Catalog= " & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||
End If
|
||||
|
||||
Case "Oracle".ToUpper
|
||||
If DTConnection.Rows(0).Item("BEMERKUNG").ToString.Contains("without tnsnames") Then
|
||||
connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & DTConnection.Rows(0).Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
|
||||
DTConnection.Rows(0).Item("DATENBANK") & ")));User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||
Else
|
||||
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Persist Security Info=True;User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";Unicode=True"
|
||||
End If
|
||||
|
||||
|
||||
Case Else
|
||||
MsgBox("ConnectionType not integrated", MsgBoxStyle.Critical, "Please check connection:")
|
||||
End Select
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in GetConnectionString:")
|
||||
|
||||
End Try
|
||||
Return connectionString
|
||||
End Function
|
||||
Public Function FilterDatatable(myDatatable As DataTable, myFilter As String, mycheckColumn As String, pSortString As String, returnDT As Boolean) As Object
|
||||
Try
|
||||
If myDatatable.Rows.Count = 0 Then
|
||||
|
||||
Reference in New Issue
Block a user