* „Linie 201: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.

Linie 202: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 203: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 204: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 240: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 241: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 242: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.“ in Datei „Interfaces\ActiveDirectoryInterface\SyncUsers.MSSQL.vb“
This commit is contained in:
Developer01
2025-12-29 14:50:17 +01:00
parent 59be68d008
commit ad6bfea0f4

View File

@@ -198,10 +198,10 @@ Namespace SyncUsers
_logger.Debug("UserId of User [{0}] is [{1}]", User, oUserId)
If oUserId = 0 Then
Dim oPrename = User.GivenName.EscapeForSQL()
Dim oSurname = User.Surname.EscapeForSQL()
Dim oUsername = User.samAccountName.EscapeForSQL()
Dim oEmail = User.Email.EscapeForSQL()
Dim oPrename = User.GivenName
Dim oSurname = User.Surname
Dim oUsername = User.samAccountName
Dim oEmail = User.Email
Dim oSQL As String = $"INSERT INTO TBDD_USER (PRENAME, NAME, USERNAME, EMAIL, ADDED_WHO) VALUES ('{oPrename}', '{oSurname}', UPPER('{oUsername}'), '{oEmail}', '{ADDED_WHO}')"
Dim oResult = _mssql.ExecuteNonQuery(oSQL)
@@ -237,9 +237,9 @@ Namespace SyncUsers
Dim oUserId As Integer = GetUserId(User.samAccountName)
If Not IsNothing(oUserId) Then
If oUserId > 0 Then
Dim oPrename = User.GivenName.EscapeForSQL()
Dim oSurname = User.Surname.EscapeForSQL()
Dim oEmail = User.Email.EscapeForSQL()
Dim oPrename = User.GivenName
Dim oSurname = User.Surname
Dim oEmail = User.Email
Dim oSQL As String = $"UPDATE TBDD_USER SET PRENAME = '{oPrename}', NAME = '{oSurname}', EMAIL = '{oEmail}', CHANGED_WHO = '{ADDED_WHO}' WHERE GUID = {oUserId}"
Dim oResult = _mssql.ExecuteNonQuery(oSQL)