Use Database from Monorepo, Add initial ODBC Support

This commit is contained in:
Jonathan Jenne
2019-08-06 15:41:02 +02:00
parent 6e6a483602
commit 43d3ba5ef2
15 changed files with 237 additions and 364 deletions

View File

@@ -30,7 +30,7 @@ Public Class frmStart
frmConfig_Basic.ShowDialog()
End If
If clsDatabase.DB_DEFAULT_INITIALIZED = True Then
If Database.DBInitialized = True Then
If ERROR_INIT <> "" Then
If ERROR_INIT = "NO CLIENT" Then
MsgBox("You are not related to a client!" & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
@@ -66,7 +66,7 @@ Public Class frmStart
End If
Try
Dim sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Clipboard-Watcher')"
clsDatabase.Execute_non_Query(sql, True)
Database.ExecuteNonQuery(sql, True)
ClassWindowLocation.SaveFormLocationSize(Me, "")
My.Settings.Save()
Catch ex As Exception
@@ -150,8 +150,8 @@ Public Class frmStart
Dim oResultDocs As Integer = 0
Dim oResultData As Integer = 0
Dim oDataSearches As DataTable = clsDatabase.Return_Datatable($"SELECT COUNT_COMMAND FROM TBCW_PROF_DATA_SEARCH WHERE PROFILE_ID = {oProfile.Guid}")
Dim oDocSearches As DataTable = clsDatabase.Return_Datatable($"SELECT COUNT_COMMAND FROM TBCW_PROF_DOC_SEARCH WHERE PROFILE_ID = {oProfile.Guid}")
Dim oDataSearches As DataTable = Database.GetDatatable($"SELECT COUNT_COMMAND FROM TBCW_PROF_DATA_SEARCH WHERE PROFILE_ID = {oProfile.Guid}")
Dim oDocSearches As DataTable = Database.GetDatatable($"SELECT COUNT_COMMAND FROM TBCW_PROF_DOC_SEARCH WHERE PROFILE_ID = {oProfile.Guid}")
For Each oRow As DataRow In oDataSearches.Rows
Try
@@ -162,7 +162,7 @@ Public Class frmStart
End If
oDataSQL = clsPatterns.ReplaceAllValues(oCountCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfile.Guid)
oResultData += ClassDatabase.Execute_Scalar(oDataSQL, MyConnectionString)
oResultData += Database.NewExecuteScalar(oDataSQL)
Catch ex As Exception
Logger.Warn("Invalid SQL Query for Counting Data in Profile {0}: {1}", oProfile.Guid, oDataSQL)
oInvalidDataSQL = True
@@ -178,7 +178,7 @@ Public Class frmStart
End If
oDataSQL = clsPatterns.ReplaceAllValues(oCountCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfile.Guid)
oResultDocs += ClassDatabase.Execute_Scalar(oDataSQL, MyConnectionString)
oResultDocs += Database.NewExecuteScalar(oDataSQL)
Catch ex As Exception
oInvalidDocumentSQL = True
Logger.Warn("Invalid SQL Query for Counting Data in Profile {0}: {1}", oProfile.Guid, oDataSQL)