remove obsolete mysqlserver methods
This commit is contained in:
parent
c4e5557d4d
commit
e2b9e9fe49
@ -53,9 +53,6 @@
|
||||
<Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DigitalData.Controls.ChatNewConv">
|
||||
<HintPath>..\Controls.ChatNewConv\obj\Debug\DigitalData.Controls.ChatNewConv.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Database, Version=1.0.0.6, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
@ -146,6 +143,10 @@
|
||||
<Project>{1f278760-4f6b-42e8-b82d-01d4c8618340}</Project>
|
||||
<Name>ChatControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls.ChatNewConv\ChatNewConv.vbproj">
|
||||
<Project>{86d27ffa-480f-481d-8d23-26deae92fe6c}</Project>
|
||||
<Name>ChatNewConv</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
|
||||
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
||||
<Name>Logging</Name>
|
||||
|
||||
@ -66,7 +66,7 @@ Public Class ChatNewConv
|
||||
If _Database.ExecuteNonQuery(oSQL) = True Then
|
||||
Dim oError As Boolean = False
|
||||
oSQL = $"SELECT MAX(CONVERSATION_ID) FROM VWIDB_CONVERSATION WHERE IDB_OBJ_ID = {IDBObjectId}"
|
||||
Dim oCONV_ID = _Database.NewExecuteScalar(oSQL)
|
||||
Dim oCONV_ID = _Database.GetScalarValue(oSQL)
|
||||
If Not IsNothing(oCONV_ID) Then
|
||||
NewConversation = oCONV_ID
|
||||
Dim oSelectedUsers As Integer() = GridViewUsers.GetSelectedRows()
|
||||
|
||||
@ -108,7 +108,7 @@ Public Class MSSQLServer
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
_Logger.Debug("Running Query: {0}", SqlCommand)
|
||||
_Logger.Debug("GetDatatable: Running Query [{0}]", SqlCommand)
|
||||
|
||||
Using oConnection = GetSQLConnection()
|
||||
Using oSQLCOmmand = oConnection.CreateCommand()
|
||||
@ -123,7 +123,8 @@ Public Class MSSQLServer
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("sqlcommand: " & SqlCommand)
|
||||
_Logger.Warn("GetDatatable failed with:")
|
||||
_Logger.Warn("SQL Query: {0}", SqlCommand)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@ -138,7 +139,7 @@ Public Class MSSQLServer
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
_Logger.Debug("Running Query: {0}", SqlCommand)
|
||||
_Logger.Debug("GetDatatableWithConnection: Running Query [{0}]", SqlCommand)
|
||||
|
||||
Using oConnection = GetSQLConnection(ConnectionString)
|
||||
Using oSQLCOmmand = oConnection.CreateCommand()
|
||||
@ -155,22 +156,11 @@ Public Class MSSQLServer
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("GetDatatableWithConnection failed with:")
|
||||
_Logger.Warn("ConnectionString: ")
|
||||
_Logger.Warn("SQL Query: " & SqlCommand)
|
||||
_Logger.Warn("SQL Query: {0}", SqlCommand)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Executes the passed sql-statement
|
||||
''' </summary>
|
||||
''' <param name="executeStatement">the sql statement</param>
|
||||
''' <returns>Returns true if properly executed, else false</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function NewExecutenonQuery(executeStatement As String) As Boolean
|
||||
'_Logger.Warn("NewExecutenonQuery is deprecated. Use ExecuteNonQuery instead.")
|
||||
Return ExecuteNonQuery(executeStatement)
|
||||
End Function
|
||||
|
||||
Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery
|
||||
Try
|
||||
If TestCanConnect() = False Then
|
||||
@ -189,7 +179,8 @@ Public Class MSSQLServer
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("executeStatement: " & SQLCommand)
|
||||
_Logger.Warn("ExecuteNonQuery failed:")
|
||||
_Logger.Warn("SQL Query: " & SQLCommand)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@ -220,16 +211,6 @@ Public Class MSSQLServer
|
||||
Return ExecuteNonQuery(SQLCommand, _Timeout)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Executes the passed sql-statement as Scalar
|
||||
''' </summary>
|
||||
''' <param name="ScalarSQL">the sql statement</param>
|
||||
''' <returns>Returns true if properly executed, else false</returns>
|
||||
Public Function NewExecuteScalar(ScalarSQL As String) As Object
|
||||
_Logger.Warn("NewExecuteScalar is deprecated. Use GetScalarValue instead.")
|
||||
Return GetScalarValue(ScalarSQL)
|
||||
End Function
|
||||
|
||||
Public Function GetScalarValue(SQLCommand As String, Timeout As Integer) As Object Implements IDatabase.GetScalarValue
|
||||
Try
|
||||
If TestCanConnect() = False Then
|
||||
@ -286,7 +267,7 @@ Public Class MSSQLServer
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
_Logger.Debug("Running Query: {0}", SQLCommand)
|
||||
_Logger.Debug("GetScalarValue: Running Query [{0}]", SQLCommand)
|
||||
|
||||
If SQLCommand.CommandText.Contains(" ") Then
|
||||
SQLCommand.CommandType = CommandType.Text
|
||||
@ -349,7 +330,7 @@ Public Class MSSQLServer
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
_Logger.Debug("Running Query: {0}", SqlCommand)
|
||||
_Logger.Debug("NewExecuteNonQueryAsync: Running Query [{0}]", SqlCommand)
|
||||
|
||||
Try
|
||||
Dim oCallback As New AsyncCallback(AddressOf NewExecuteNonQueryAsync_Callback)
|
||||
|
||||
@ -124,7 +124,7 @@ Namespace SyncUsers
|
||||
Dim oResult = True
|
||||
If _mssql.GetScalarValue(oSQL) = 0 Then
|
||||
oSQL = $"INSERT INTO TBDD_GROUPS_USER (USER_ID, GROUP_ID, ADDED_WHO) VALUES ({UserId}, {GroupId}, '{ADDED_WHO}')"
|
||||
oResult = _mssql.NewExecutenonQuery(oSQL)
|
||||
oResult = _mssql.ExecuteNonQuery(oSQL)
|
||||
Else
|
||||
_logger.Debug($"UserGroup-Relation [{UserId}/{GroupId}] already existing")
|
||||
Return False
|
||||
@ -179,7 +179,7 @@ Namespace SyncUsers
|
||||
Dim oUserId As Integer = GetUserId(User.samAccountName)
|
||||
If oUserId = 0 Then
|
||||
Dim oSQL As String = $"INSERT INTO TBDD_USER (PRENAME, NAME, USERNAME, EMAIL, ADDED_WHO) VALUES ('{User.GivenName}', '{User.Surname}', UPPER('{User.samAccountName}'), '{User.Email}', '{ADDED_WHO}')"
|
||||
Dim oResult = _mssql.NewExecutenonQuery(oSQL)
|
||||
Dim oResult = _mssql.ExecuteNonQuery(oSQL)
|
||||
|
||||
If oResult = True Then
|
||||
oUserId = _mssql.GetScalarValue("SELECT MAX(GUID) FROM TBDD_USER")
|
||||
@ -202,7 +202,7 @@ Namespace SyncUsers
|
||||
Dim oUserId As Integer = GetUserId(User.samAccountName)
|
||||
If oUserId > 0 Then
|
||||
Dim oSQL As String = $"UPDATE TBDD_USER SET PRENAME = '{User.GivenName}', NAME = '{User.Surname}', EMAIL = '{User.Email}', CHANGED_WHO = '{ADDED_WHO}' WHERE GUID = {oUserId}"
|
||||
Dim oResult = _mssql.NewExecutenonQuery(oSQL)
|
||||
Dim oResult = _mssql.ExecuteNonQuery(oSQL)
|
||||
|
||||
If oResult = True Then
|
||||
Return oUserId
|
||||
@ -226,7 +226,7 @@ Namespace SyncUsers
|
||||
For Each oAttribute In oCustomAttributes
|
||||
_logger.Debug("Adding Custom Attribute [{0}] with value [{1}] to User [{2}]", oAttribute.MSSQLColumn, oAttribute.Value, User)
|
||||
Dim oSQL As String = $"UPDATE TBDD_USER SET {oAttribute.MSSQLColumn} = '{oAttribute.Value}', CHANGED_WHO = '{ADDED_WHO}' WHERE GUID = {UserId}"
|
||||
Dim oResult = _mssql.NewExecutenonQuery(oSQL)
|
||||
Dim oResult = _mssql.ExecuteNonQuery(oSQL)
|
||||
|
||||
If oResult = False Then
|
||||
_logger.Debug("Custom Attribute {0} could not be added to user {1}", oAttribute.Name, User.samAccountName)
|
||||
|
||||
@ -101,7 +101,7 @@ Public Class ImportZUGFeRDFiles
|
||||
Try
|
||||
'PRCUST_ADD_HISTORY_STATE: @MessageID VARCHAR(250), @TITLE1 VARCHAR(250), @TITLE2 VARCHAR(250)
|
||||
Dim oSQL = $"EXEC PRCUST_ADD_HISTORY_STATE '{oMessageID}','{oTitle}','{oTitle1}','{oComment}'"
|
||||
_mssql.NewExecutenonQuery(oSQL)
|
||||
_mssql.ExecuteNonQuery(oSQL)
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
@ -434,7 +434,7 @@ Public Class ImportZUGFeRDFiles
|
||||
_logger.Debug("Mapping Property [{0}] to value [{1}] . Will be inserted into table {2}", oProperty.Description, oProperty.Value, oProperty.TableName)
|
||||
' Insert into SQL Server
|
||||
If oArgs.InsertIntoSQLServer = True Then
|
||||
Dim oResult = _mssql.NewExecutenonQuery(oCommand)
|
||||
Dim oResult = _mssql.ExecuteNonQuery(oCommand)
|
||||
If oResult = False Then
|
||||
_logger.Warn($"SQL Command [{oCommand}] was not successful. Check the log.")
|
||||
End If
|
||||
|
||||
@ -312,7 +312,7 @@ Public Class MyComService
|
||||
' End If
|
||||
If oSendResult = True Then
|
||||
Dim oUpdCommand = "UPDATE TBEMLP_EMAIL_OUT SET EMAIL_SENT = GETDATE() WHERE GUID = " & oGUID
|
||||
_MSSQL.NewExecutenonQuery(oUpdCommand)
|
||||
_MSSQL.ExecuteNonQuery(oUpdCommand)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
|
||||
@ -314,7 +314,7 @@ Public Class EmailService
|
||||
If oSQL.Contains(",COMMENT = ''") Then
|
||||
oSQL.Replace(",COMMENT = ''", "")
|
||||
End If
|
||||
MSSQLInstance.NewExecutenonQuery(oSQL)
|
||||
MSSQLInstance.ExecuteNonQuery(oSQL)
|
||||
End Select
|
||||
_Logger.Info($"Email has been send to: {oEmailTo} - Subject: {oSubject}")
|
||||
Threading.Thread.Sleep(500)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user