MS_13022016
This commit is contained in:
parent
85d4120c50
commit
8016ae977e
@ -49,7 +49,8 @@
|
||||
|
||||
Public Shared Function GetControlGuid(name As String)
|
||||
Try
|
||||
Return ClassDatabase.Execute_Scalar("SELECT GUID FROM TBPMO_CONTROL WHERE NAME = '" & name & "'")
|
||||
Dim sql = "SELECT GUID FROM TBPMO_CONTROL WHERE NAME = '" & name & "'"
|
||||
Return ClassDatabase.Execute_Scalar(sql)
|
||||
Catch ex As Exception
|
||||
Return -1
|
||||
End Try
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports System.Data.Odbc
|
||||
|
||||
Public Class ClassDatabase
|
||||
Private Shared connectionString As String
|
||||
@ -24,7 +25,12 @@ Public Class ClassDatabase
|
||||
If DTConnection.Rows.Count = 1 Then
|
||||
Select Case DTConnection.Rows(0).Item("SQL_PROVIDER")
|
||||
Case "MS-SQLServer"
|
||||
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||
If DTConnection.Rows(0).Item("USERNAME") = "WINAUTH" Then
|
||||
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";Trusted_Connection=True;"
|
||||
Else
|
||||
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||
End If
|
||||
' connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||
Case "Oracle"
|
||||
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=" & _
|
||||
@ -32,6 +38,9 @@ Public Class ClassDatabase
|
||||
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 "ODBC"
|
||||
Dim conn As New OdbcConnection("dsn=" & DTConnection.Rows(0).Item("SERVER") & ";uid=" & DTConnection.Rows(0).Item("USERNAME") & ";pwd=" + DTConnection.Rows(0).Item("PASSWORD"))
|
||||
connectionString = conn.ConnectionString
|
||||
Case Else
|
||||
ClassLogger.Add(" - ConnectionType nicht integriert", False)
|
||||
MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!")
|
||||
|
||||
86
app/DD-Record-Organiser/frmConfig_Basic.Designer.vb
generated
86
app/DD-Record-Organiser/frmConfig_Basic.Designer.vb
generated
@ -23,7 +23,7 @@ Partial Class frmConfig_Basic
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Basic))
|
||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||
Me.chkbxUserAut = New System.Windows.Forms.CheckBox()
|
||||
@ -37,6 +37,7 @@ Partial Class frmConfig_Basic
|
||||
Me.txtServer = New System.Windows.Forms.TextBox()
|
||||
Me.txtUser = New System.Windows.Forms.TextBox()
|
||||
Me.txtPasswort = New System.Windows.Forms.TextBox()
|
||||
Me.BtnConnect = New System.Windows.Forms.Button()
|
||||
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
||||
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
@ -53,6 +54,8 @@ Partial Class frmConfig_Basic
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.chkboxQuickMenue = New System.Windows.Forms.CheckBox()
|
||||
Me.chkLogErrorsOnly = New System.Windows.Forms.CheckBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.btnApplicationFolder = New System.Windows.Forms.Button()
|
||||
Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
|
||||
Me.TabPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
@ -61,9 +64,6 @@ Partial Class frmConfig_Basic
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.txtScanFolderWatch = New System.Windows.Forms.TextBox()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.BtnConnect = New System.Windows.Forms.Button()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.btnApplicationFolder = New System.Windows.Forms.Button()
|
||||
Me.btnstartstop2 = New System.Windows.Forms.Button()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
@ -78,16 +78,15 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'TabControl1
|
||||
'
|
||||
resources.ApplyResources(Me.TabControl1, "TabControl1")
|
||||
Me.TabControl1.Controls.Add(Me.TabPage1)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage2)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage3)
|
||||
resources.ApplyResources(Me.TabControl1, "TabControl1")
|
||||
Me.TabControl1.Name = "TabControl1"
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
'
|
||||
'TabPage1
|
||||
'
|
||||
resources.ApplyResources(Me.TabPage1, "TabPage1")
|
||||
Me.TabPage1.Controls.Add(Me.chkbxUserAut)
|
||||
Me.TabPage1.Controls.Add(Me.Label5)
|
||||
Me.TabPage1.Controls.Add(Me.cmbDatenbank)
|
||||
@ -100,6 +99,7 @@ Partial Class frmConfig_Basic
|
||||
Me.TabPage1.Controls.Add(Me.txtUser)
|
||||
Me.TabPage1.Controls.Add(Me.txtPasswort)
|
||||
Me.TabPage1.Controls.Add(Me.BtnConnect)
|
||||
resources.ApplyResources(Me.TabPage1, "TabPage1")
|
||||
Me.TabPage1.Name = "TabPage1"
|
||||
Me.TabPage1.UseVisualStyleBackColor = True
|
||||
'
|
||||
@ -116,8 +116,8 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'cmbDatenbank
|
||||
'
|
||||
resources.ApplyResources(Me.cmbDatenbank, "cmbDatenbank")
|
||||
Me.cmbDatenbank.FormattingEnabled = True
|
||||
resources.ApplyResources(Me.cmbDatenbank, "cmbDatenbank")
|
||||
Me.cmbDatenbank.Name = "cmbDatenbank"
|
||||
'
|
||||
'Label4
|
||||
@ -149,26 +149,32 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'txtServer
|
||||
'
|
||||
resources.ApplyResources(Me.txtServer, "txtServer")
|
||||
Me.txtServer.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
resources.ApplyResources(Me.txtServer, "txtServer")
|
||||
Me.txtServer.Name = "txtServer"
|
||||
'
|
||||
'txtUser
|
||||
'
|
||||
resources.ApplyResources(Me.txtUser, "txtUser")
|
||||
Me.txtUser.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
resources.ApplyResources(Me.txtUser, "txtUser")
|
||||
Me.txtUser.Name = "txtUser"
|
||||
'
|
||||
'txtPasswort
|
||||
'
|
||||
resources.ApplyResources(Me.txtPasswort, "txtPasswort")
|
||||
Me.txtPasswort.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
resources.ApplyResources(Me.txtPasswort, "txtPasswort")
|
||||
Me.txtPasswort.Name = "txtPasswort"
|
||||
Me.txtPasswort.UseSystemPasswordChar = True
|
||||
'
|
||||
'BtnConnect
|
||||
'
|
||||
Me.BtnConnect.Image = Global.DD_Record_Organiser.My.Resources.Resources.database_go1
|
||||
resources.ApplyResources(Me.BtnConnect, "BtnConnect")
|
||||
Me.BtnConnect.Name = "BtnConnect"
|
||||
Me.BtnConnect.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TabPage2
|
||||
'
|
||||
resources.ApplyResources(Me.TabPage2, "TabPage2")
|
||||
Me.TabPage2.Controls.Add(Me.GroupBox4)
|
||||
Me.TabPage2.Controls.Add(Me.GroupBox3)
|
||||
Me.TabPage2.Controls.Add(Me.GroupBox2)
|
||||
@ -177,14 +183,15 @@ Partial Class frmConfig_Basic
|
||||
Me.TabPage2.Controls.Add(Me.Button1)
|
||||
Me.TabPage2.Controls.Add(Me.btnApplicationFolder)
|
||||
Me.TabPage2.Controls.Add(Me.LinkLabel1)
|
||||
resources.ApplyResources(Me.TabPage2, "TabPage2")
|
||||
Me.TabPage2.Name = "TabPage2"
|
||||
Me.TabPage2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox4
|
||||
'
|
||||
resources.ApplyResources(Me.GroupBox4, "GroupBox4")
|
||||
Me.GroupBox4.Controls.Add(Me.Button3)
|
||||
Me.GroupBox4.Controls.Add(Me.cmbLanguage)
|
||||
resources.ApplyResources(Me.GroupBox4, "GroupBox4")
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.TabStop = False
|
||||
'
|
||||
@ -196,17 +203,17 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'cmbLanguage
|
||||
'
|
||||
resources.ApplyResources(Me.cmbLanguage, "cmbLanguage")
|
||||
Me.cmbLanguage.FormattingEnabled = True
|
||||
Me.cmbLanguage.Items.AddRange(New Object() {resources.GetString("cmbLanguage.Items"), resources.GetString("cmbLanguage.Items1")})
|
||||
resources.ApplyResources(Me.cmbLanguage, "cmbLanguage")
|
||||
Me.cmbLanguage.Name = "cmbLanguage"
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
resources.ApplyResources(Me.GroupBox3, "GroupBox3")
|
||||
Me.GroupBox3.Controls.Add(Me.Label7)
|
||||
Me.GroupBox3.Controls.Add(Me.cmbConstructor)
|
||||
Me.GroupBox3.Controls.Add(Me.CheckBox1)
|
||||
resources.ApplyResources(Me.GroupBox3, "GroupBox3")
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.TabStop = False
|
||||
'
|
||||
@ -217,8 +224,8 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'cmbConstructor
|
||||
'
|
||||
resources.ApplyResources(Me.cmbConstructor, "cmbConstructor")
|
||||
Me.cmbConstructor.FormattingEnabled = True
|
||||
resources.ApplyResources(Me.cmbConstructor, "cmbConstructor")
|
||||
Me.cmbConstructor.Name = "cmbConstructor"
|
||||
'
|
||||
'CheckBox1
|
||||
@ -232,11 +239,11 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
resources.ApplyResources(Me.GroupBox2, "GroupBox2")
|
||||
Me.GroupBox2.Controls.Add(Me.CheckBoxWD_ShowEnitityDocs)
|
||||
Me.GroupBox2.Controls.Add(Me.chkbxloadWDDocs)
|
||||
Me.GroupBox2.Controls.Add(Me.Label6)
|
||||
Me.GroupBox2.Controls.Add(Me.txtwdSearch_Count)
|
||||
resources.ApplyResources(Me.GroupBox2, "GroupBox2")
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.TabStop = False
|
||||
'
|
||||
@ -264,8 +271,8 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
resources.ApplyResources(Me.GroupBox1, "GroupBox1")
|
||||
Me.GroupBox1.Controls.Add(Me.chkboxQuickMenue)
|
||||
resources.ApplyResources(Me.GroupBox1, "GroupBox1")
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.TabStop = False
|
||||
'
|
||||
@ -281,6 +288,20 @@ Partial Class frmConfig_Basic
|
||||
Me.chkLogErrorsOnly.Name = "chkLogErrorsOnly"
|
||||
Me.chkLogErrorsOnly.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
|
||||
resources.ApplyResources(Me.Button1, "Button1")
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnApplicationFolder
|
||||
'
|
||||
Me.btnApplicationFolder.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
|
||||
resources.ApplyResources(Me.btnApplicationFolder, "btnApplicationFolder")
|
||||
Me.btnApplicationFolder.Name = "btnApplicationFolder"
|
||||
Me.btnApplicationFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LinkLabel1
|
||||
'
|
||||
resources.ApplyResources(Me.LinkLabel1, "LinkLabel1")
|
||||
@ -289,7 +310,6 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'TabPage3
|
||||
'
|
||||
resources.ApplyResources(Me.TabPage3, "TabPage3")
|
||||
Me.TabPage3.Controls.Add(Me.Label9)
|
||||
Me.TabPage3.Controls.Add(Me.DataGridView1)
|
||||
Me.TabPage3.Controls.Add(Me.btnSaveExclusionFiles)
|
||||
@ -297,6 +317,7 @@ Partial Class frmConfig_Basic
|
||||
Me.TabPage3.Controls.Add(Me.txtScanFolderWatch)
|
||||
Me.TabPage3.Controls.Add(Me.Label8)
|
||||
Me.TabPage3.Controls.Add(Me.btnstartstop2)
|
||||
resources.ApplyResources(Me.TabPage3, "TabPage3")
|
||||
Me.TabPage3.Name = "TabPage3"
|
||||
Me.TabPage3.UseVisualStyleBackColor = True
|
||||
'
|
||||
@ -307,9 +328,9 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'DataGridView1
|
||||
'
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.Color.Aqua
|
||||
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
||||
resources.ApplyResources(Me.DataGridView1, "DataGridView1")
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.Color.Aqua
|
||||
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
||||
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.DataGridView1.Name = "DataGridView1"
|
||||
'
|
||||
@ -327,8 +348,8 @@ Partial Class frmConfig_Basic
|
||||
'
|
||||
'txtScanFolderWatch
|
||||
'
|
||||
resources.ApplyResources(Me.txtScanFolderWatch, "txtScanFolderWatch")
|
||||
Me.txtScanFolderWatch.BackColor = System.Drawing.Color.LemonChiffon
|
||||
resources.ApplyResources(Me.txtScanFolderWatch, "txtScanFolderWatch")
|
||||
Me.txtScanFolderWatch.Name = "txtScanFolderWatch"
|
||||
'
|
||||
'Label8
|
||||
@ -336,31 +357,10 @@ Partial Class frmConfig_Basic
|
||||
resources.ApplyResources(Me.Label8, "Label8")
|
||||
Me.Label8.Name = "Label8"
|
||||
'
|
||||
'BtnConnect
|
||||
'
|
||||
resources.ApplyResources(Me.BtnConnect, "BtnConnect")
|
||||
Me.BtnConnect.Image = Global.DD_Record_Organiser.My.Resources.Resources.database_go1
|
||||
Me.BtnConnect.Name = "BtnConnect"
|
||||
Me.BtnConnect.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
resources.ApplyResources(Me.Button1, "Button1")
|
||||
Me.Button1.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnApplicationFolder
|
||||
'
|
||||
resources.ApplyResources(Me.btnApplicationFolder, "btnApplicationFolder")
|
||||
Me.btnApplicationFolder.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
|
||||
Me.btnApplicationFolder.Name = "btnApplicationFolder"
|
||||
Me.btnApplicationFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnstartstop2
|
||||
'
|
||||
resources.ApplyResources(Me.btnstartstop2, "btnstartstop2")
|
||||
Me.btnstartstop2.Image = Global.DD_Record_Organiser.My.Resources.Resources.bell_go
|
||||
resources.ApplyResources(Me.btnstartstop2, "btnstartstop2")
|
||||
Me.btnstartstop2.Name = "btnstartstop2"
|
||||
Me.btnstartstop2.UseVisualStyleBackColor = True
|
||||
'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,9 @@ Public Class frmConfig_Basic
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = MyConnectionString
|
||||
Dim constr = connection.ConnectionString
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
If chkbxUserAut.Checked = False Then
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
End If
|
||||
Me.txtActualConnection.Text = constr
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@ -95,10 +97,16 @@ Public Class frmConfig_Basic
|
||||
csb.ConnectionString = MyConnectionString
|
||||
|
||||
Dim constr = MyConnectionString
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
If Not MyConnectionString.Contains("Trusted") Then
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
txtUser.Text = csb.UserID
|
||||
chkbxUserAut.Checked = False
|
||||
Else
|
||||
chkbxUserAut.Checked = True
|
||||
End If
|
||||
|
||||
Try
|
||||
txtServer.Text = csb.DataSource
|
||||
txtUser.Text = csb.UserID
|
||||
cmbDatenbank.Text = csb.InitialCatalog
|
||||
Catch ex As Exception
|
||||
|
||||
@ -353,4 +361,22 @@ Public Class frmConfig_Basic
|
||||
Me.Size = sz
|
||||
Me.Location = pt
|
||||
End Sub
|
||||
|
||||
Private Sub chkbxUserAut_CheckedChanged(sender As Object, e As EventArgs) Handles chkbxUserAut.CheckedChanged
|
||||
If chkbxUserAut.Checked Then
|
||||
Me.txtPasswort.Enabled = False
|
||||
Me.txtUser.Enabled = False
|
||||
Else
|
||||
Me.txtPasswort.Enabled = True
|
||||
Me.txtUser.Enabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtActualConnection_TextChanged(sender As Object, e As EventArgs) Handles txtActualConnection.TextChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmbDatenbank_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDatenbank.SelectedIndexChanged
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
14
app/DD-Record-Organiser/frmConnections.Designer.vb
generated
14
app/DD-Record-Organiser/frmConnections.Designer.vb
generated
@ -66,7 +66,7 @@ Partial Class frmConnections
|
||||
Me.chkOR_ohne_TNS = New System.Windows.Forms.CheckBox()
|
||||
Me.lblSave = New System.Windows.Forms.Label()
|
||||
Me.SQL_PROVIDERComboBox = New System.Windows.Forms.ComboBox()
|
||||
Me.lblDataSource = New System.Windows.Forms.Label()
|
||||
Me.lblServer = New System.Windows.Forms.Label()
|
||||
Me.lblInitialCatalog = New System.Windows.Forms.Label()
|
||||
Me.lblUserId = New System.Windows.Forms.Label()
|
||||
Me.lblPassword = New System.Windows.Forms.Label()
|
||||
@ -341,13 +341,13 @@ Partial Class frmConnections
|
||||
Me.SQL_PROVIDERComboBox.DataBindings.Add(New System.Windows.Forms.Binding("SelectedItem", Me.TBDD_CONNECTIONBindingSource, "SQL_PROVIDER", True))
|
||||
resources.ApplyResources(Me.SQL_PROVIDERComboBox, "SQL_PROVIDERComboBox")
|
||||
Me.SQL_PROVIDERComboBox.FormattingEnabled = True
|
||||
Me.SQL_PROVIDERComboBox.Items.AddRange(New Object() {resources.GetString("SQL_PROVIDERComboBox.Items"), resources.GetString("SQL_PROVIDERComboBox.Items1")})
|
||||
Me.SQL_PROVIDERComboBox.Items.AddRange(New Object() {resources.GetString("SQL_PROVIDERComboBox.Items"), resources.GetString("SQL_PROVIDERComboBox.Items1"), resources.GetString("SQL_PROVIDERComboBox.Items2"), resources.GetString("SQL_PROVIDERComboBox.Items3")})
|
||||
Me.SQL_PROVIDERComboBox.Name = "SQL_PROVIDERComboBox"
|
||||
'
|
||||
'lblDataSource
|
||||
'lblServer
|
||||
'
|
||||
resources.ApplyResources(Me.lblDataSource, "lblDataSource")
|
||||
Me.lblDataSource.Name = "lblDataSource"
|
||||
resources.ApplyResources(Me.lblServer, "lblServer")
|
||||
Me.lblServer.Name = "lblServer"
|
||||
'
|
||||
'lblInitialCatalog
|
||||
'
|
||||
@ -389,7 +389,7 @@ Partial Class frmConnections
|
||||
Me.Controls.Add(Me.lblPassword)
|
||||
Me.Controls.Add(Me.lblUserId)
|
||||
Me.Controls.Add(Me.lblInitialCatalog)
|
||||
Me.Controls.Add(Me.lblDataSource)
|
||||
Me.Controls.Add(Me.lblServer)
|
||||
Me.Controls.Add(SQL_PROVIDERLabel)
|
||||
Me.Controls.Add(Me.SQL_PROVIDERComboBox)
|
||||
Me.Controls.Add(Me.lblSave)
|
||||
@ -461,7 +461,7 @@ Partial Class frmConnections
|
||||
Friend WithEvents chkOR_ohne_TNS As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents lblSave As System.Windows.Forms.Label
|
||||
Friend WithEvents SQL_PROVIDERComboBox As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents lblDataSource As System.Windows.Forms.Label
|
||||
Friend WithEvents lblServer As System.Windows.Forms.Label
|
||||
Friend WithEvents lblInitialCatalog As System.Windows.Forms.Label
|
||||
Friend WithEvents lblUserId As System.Windows.Forms.Label
|
||||
Friend WithEvents lblPassword As System.Windows.Forms.Label
|
||||
|
||||
@ -1029,6 +1029,12 @@
|
||||
<data name="SQL_PROVIDERComboBox.Items1" xml:space="preserve">
|
||||
<value>Oracle</value>
|
||||
</data>
|
||||
<data name="SQL_PROVIDERComboBox.Items2" xml:space="preserve">
|
||||
<value>ODBC (SAP - MAXDB)</value>
|
||||
</data>
|
||||
<data name="SQL_PROVIDERComboBox.Items3" xml:space="preserve">
|
||||
<value>ODBC</value>
|
||||
</data>
|
||||
<data name="SQL_PROVIDERComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>183, 83</value>
|
||||
</data>
|
||||
@ -1050,34 +1056,34 @@
|
||||
<data name=">>SQL_PROVIDERComboBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="lblDataSource.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="lblServer.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="lblDataSource.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<data name="lblServer.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 8.25pt</value>
|
||||
</data>
|
||||
<data name="lblDataSource.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<data name="lblServer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>181, 106</value>
|
||||
</data>
|
||||
<data name="lblDataSource.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="lblServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>74, 13</value>
|
||||
</data>
|
||||
<data name="lblDataSource.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="lblServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="lblDataSource.Text" xml:space="preserve">
|
||||
<data name="lblServer.Text" xml:space="preserve">
|
||||
<value>DataSource*:</value>
|
||||
</data>
|
||||
<data name=">>lblDataSource.Name" xml:space="preserve">
|
||||
<value>lblDataSource</value>
|
||||
<data name=">>lblServer.Name" xml:space="preserve">
|
||||
<value>lblServer</value>
|
||||
</data>
|
||||
<data name=">>lblDataSource.Type" xml:space="preserve">
|
||||
<data name=">>lblServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>lblDataSource.Parent" xml:space="preserve">
|
||||
<data name=">>lblServer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>lblDataSource.ZOrder" xml:space="preserve">
|
||||
<data name=">>lblServer.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="lblInitialCatalog.AutoSize" type="System.Boolean, mscorlib">
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports System.Data.Odbc
|
||||
|
||||
|
||||
Public Class frmConnections
|
||||
@ -49,7 +50,7 @@ Public Class frmConnections
|
||||
Case "MS-SQLServer"
|
||||
cmbDatabase.Items.Clear()
|
||||
' DATABASETextBox.Visible = False
|
||||
Me.lblDataSource.Text = "Datenbank-Server (IP-Adresse oder Name)*:"
|
||||
Me.lblServer.Text = "Datenbank-Server (IP-Adresse oder Name)*:"
|
||||
Me.lblInitialCatalog.Text = "Datenbank-Name:"
|
||||
Me.SERVERTextBox.ReadOnly = False
|
||||
Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window
|
||||
@ -65,27 +66,49 @@ Public Class frmConnections
|
||||
Case "Oracle"
|
||||
' DATABASETextBox.Visible = True
|
||||
Me.cmbDatabase.Visible = False
|
||||
Me.lblDataSource.Text = "IP Oracle-Server:"
|
||||
Me.lblServer.Text = "IP Oracle-Server:"
|
||||
Me.lblInitialCatalog.Visible = True
|
||||
Me.lblInitialCatalog.Text = "Servicename:"
|
||||
Me.SERVERTextBox.ReadOnly = False
|
||||
Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.SERVERTextBox.Text = ""
|
||||
Me.lblUserId.Text = "UserId:"
|
||||
Me.lblPassword.Text = "Passwort:"
|
||||
Me.lblInitialCatalog.Visible = True
|
||||
|
||||
|
||||
'Me.DATENBANKTextBox.Visible = True
|
||||
chkOR_ohne_TNS.Visible = True
|
||||
End Select
|
||||
Case "ODBC (SAP - MAXDB)"
|
||||
Me.lblServer.Text = "Servername:"
|
||||
Me.lblInitialCatalog.Text = "Databasename:"
|
||||
Me.lblInitialCatalog.Visible = True
|
||||
Me.cmbDatabase.Visible = False
|
||||
|
||||
Me.lblDataSource.Visible = True
|
||||
Me.SERVERTextBox.ReadOnly = False
|
||||
Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.SERVERTextBox.Text = ""
|
||||
Me.lblUserId.Text = "Username:"
|
||||
Me.lblPassword.Text = "Password:"
|
||||
Case "ODBC"
|
||||
Me.lblServer.Text = "DSN Name:"
|
||||
Me.lblInitialCatalog.Visible = False
|
||||
Me.cmbDatabase.Visible = False
|
||||
Me.DATABASETextBox.Visible = False
|
||||
Me.SERVERTextBox.Visible = False
|
||||
Me.lblUserId.Text = "Username:"
|
||||
Me.lblPassword.Text = "Password:"
|
||||
End Select
|
||||
If Me.SQL_PROVIDERComboBox.SelectedItem <> "ODBC" Then
|
||||
|
||||
End If
|
||||
Me.SERVERTextBox.Visible = True
|
||||
Me.lblServer.Visible = True
|
||||
Me.lblUserId.Visible = True
|
||||
Me.lblPassword.Visible = True
|
||||
Me.SERVERTextBox.Visible = True
|
||||
Me.USERNAMETextBox.Visible = True
|
||||
Me.PASSWORDTextBox.Visible = True
|
||||
Else
|
||||
Me.lblDataSource.Visible = False
|
||||
Me.lblServer.Visible = False
|
||||
Me.lblUserId.Visible = False
|
||||
Me.lblPassword.Visible = False
|
||||
Me.SERVERTextBox.Visible = False
|
||||
@ -166,7 +189,29 @@ Public Class frmConnections
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & vbNewLine & vbNewLine & connstr, MsgBoxStyle.Critical, "Fehler bei Verbindungsaufbau Oracle:")
|
||||
End Try
|
||||
|
||||
Case "ODBC (SAP - MAXDB)"
|
||||
Dim Connstring
|
||||
Try
|
||||
Dim conn As New OdbcConnection("driver=sap db;servernode=" & SERVERTextBox.Text & ";serverdb=" + DATABASETextBox.Text & _
|
||||
";uid=" & USERNAMETextBox.Text & ";pwd=" + PASSWORDTextBox.Text)
|
||||
Connstring = conn.ConnectionString
|
||||
conn.Open()
|
||||
MsgBox("Die Verbindung wurde erfolgreich aufgebaut!", MsgBoxStyle.Information, "Erfolg:")
|
||||
conn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & vbNewLine & vbNewLine & Connstring, MsgBoxStyle.Critical, "Error in Create Conenction SAPMAX DB:")
|
||||
End Try
|
||||
Case "ODBC"
|
||||
Dim Connstring
|
||||
Try
|
||||
Dim conn As New OdbcConnection("dsn=" & SERVERTextBox.Text & ";uid=" & USERNAMETextBox.Text & ";pwd=" + PASSWORDTextBox.Text)
|
||||
Connstring = conn.ConnectionString
|
||||
conn.Open()
|
||||
MsgBox("Die Verbindung wurde erfolgreich aufgebaut!", MsgBoxStyle.Information, "Erfolg:")
|
||||
conn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & vbNewLine & vbNewLine & Connstring, MsgBoxStyle.Critical, "Error in Create Conenction ODBC:")
|
||||
End Try
|
||||
Case Else
|
||||
MsgBox("Test zur Zeit nicht möglich", MsgBoxStyle.Information, "Achtung:")
|
||||
End Select
|
||||
@ -231,11 +276,6 @@ Public Class frmConnections
|
||||
MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub TBDD_CONNECTIONBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs)
|
||||
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWERColumn.DefaultValue = Environment.UserName
|
||||
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWANNColumn.DefaultValue = Date.Now
|
||||
End Sub
|
||||
Private Sub BEMERKUNGTextBox_TextChanged(sender As Object, e As EventArgs) Handles BEMERKUNGTextBox.TextChanged
|
||||
If BEMERKUNGTextBox.Text.Contains("without tnsnames") Then
|
||||
Me.chkOR_ohne_TNS.Checked = True
|
||||
@ -244,9 +284,14 @@ Public Class frmConnections
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TBDD_CONNECTIONBindingSource_AddingNew1(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_CONNECTIONBindingSource.AddingNew
|
||||
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWERColumn.DefaultValue = Environment.UserName
|
||||
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWANNColumn.DefaultValue = Date.Now
|
||||
End Sub
|
||||
|
||||
Private Sub TBDD_CONNECTIONBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBDD_CONNECTIONBindingSource.CurrentChanged
|
||||
Me.lblSave.Visible = False
|
||||
Select Me.SQL_PROVIDERComboBox.SelectedItem
|
||||
Select Case Me.SQL_PROVIDERComboBox.SelectedItem
|
||||
Case "MS-SQLServer"
|
||||
cmbDatabase.Items.Clear()
|
||||
cmbDatabase.Items.Add(DATABASETextBox.Text)
|
||||
|
||||
@ -132,8 +132,24 @@ Public Class frmSQLEditor
|
||||
sqlAdapter.SelectCommand = sqlCommand
|
||||
sqlAdapter.Fill(dataset)
|
||||
|
||||
Return dataset
|
||||
ElseIf connectionString.Contains("dsn=") Then 'ODBC-Connection
|
||||
Dim sqlConnection As Odbc.OdbcConnection
|
||||
Dim sqlCommand As Odbc.OdbcCommand
|
||||
Dim sqlAdapter As New Odbc.OdbcDataAdapter
|
||||
Dim dataset As New DataSet
|
||||
|
||||
sqlConnection = New Odbc.OdbcConnection(connectionString)
|
||||
sqlConnection.Open()
|
||||
|
||||
sqlCommand = New Odbc.OdbcCommand(sql, sqlConnection)
|
||||
|
||||
sqlAdapter.SelectCommand = sqlCommand
|
||||
sqlAdapter.Fill(dataset)
|
||||
|
||||
Return dataset
|
||||
Else
|
||||
|
||||
If LogErrorsOnly = True Then ClassLogger.Add(" >> It's an Oracle-Connection (ExecuteWithConnection)", False)
|
||||
Dim sqlConnection As OracleConnection
|
||||
Dim sqlCommand As OracleCommand
|
||||
|
||||
@ -25,13 +25,16 @@
|
||||
|
||||
Public Sub LoadControlPropertiesNeu(ctrl As Control)
|
||||
Try
|
||||
Dim TagID = DirectCast(ctrl.Tag, ClassControlMetadata).Id
|
||||
Dim sql As String = String.Format("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", DirectCast(ctrl.Tag, ClassControlMetadata).Id)
|
||||
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
Dim props As Object = Nothing
|
||||
Dim r As DataRow = Nothing
|
||||
Dim type As String = Nothing
|
||||
|
||||
If dt.Rows.Count <> 1 Then
|
||||
MsgBox("Unexpected behaviour in LoadControlProperties: No Control could be loaded!" & vbNewLine & "Tag.ControlID: " & TagID.ToString, MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user