First pass of new config
This commit is contained in:
@@ -43,7 +43,7 @@ Public Class ClassDatabase
|
||||
End Function
|
||||
Public Shared Function Init()
|
||||
Try
|
||||
SQLSERVERConnectionString = MyConnectionString
|
||||
SQLSERVERConnectionString = CONNECTION_STRING
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
SQLconnect.ConnectionString = SQLSERVERConnectionString
|
||||
SQLconnect.Open()
|
||||
@@ -59,12 +59,12 @@ Public Class ClassDatabase
|
||||
Try
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> ReturnDatatable: " & Select_anweisung, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> ReturnDatatable: " & Select_anweisung, False)
|
||||
SQLconnect.ConnectionString = SQLSERVERConnectionString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
SQLcommand.CommandText = Select_anweisung
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> Execute ReturnDatatable: " & Select_anweisung, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute ReturnDatatable: " & Select_anweisung, False)
|
||||
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
|
||||
Dim dt As DataTable = New DataTable()
|
||||
adapter1.Fill(dt)
|
||||
@@ -83,7 +83,7 @@ Public Class ClassDatabase
|
||||
Public Shared Function Return_Datatable_CS(Select_anweisung As String, Conn_ID As Integer, Optional userInput As Boolean = False)
|
||||
Try
|
||||
Dim ConString As String = Get_ConnectionString(Conn_ID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> ReturnDatatable: " & Select_anweisung, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> ReturnDatatable: " & Select_anweisung, False)
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = ConString
|
||||
@@ -110,12 +110,12 @@ Public Class ClassDatabase
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = SQLSERVERConnectionString
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> Execute_non_Query: " & ExecuteCMD, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute_non_Query: " & ExecuteCMD, False)
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = ExecuteCMD
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> Execute NonQuery: " & ExecuteCMD, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute NonQuery: " & ExecuteCMD, False)
|
||||
SQLcommand.ExecuteNonQuery()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
@@ -137,12 +137,12 @@ Public Class ClassDatabase
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = ConString
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> Execute_non_Query: " & cmdscalar, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute_non_Query: " & cmdscalar, False)
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = cmdscalar
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">>> Execute Scalar: " & cmdscalar, False)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute Scalar: " & cmdscalar, False)
|
||||
result = SQLcommand.ExecuteScalar()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
|
||||
Reference in New Issue
Block a user