* „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:
@@ -198,10 +198,10 @@ Namespace SyncUsers
|
|||||||
_logger.Debug("UserId of User [{0}] is [{1}]", User, oUserId)
|
_logger.Debug("UserId of User [{0}] is [{1}]", User, oUserId)
|
||||||
|
|
||||||
If oUserId = 0 Then
|
If oUserId = 0 Then
|
||||||
Dim oPrename = User.GivenName.EscapeForSQL()
|
Dim oPrename = User.GivenName
|
||||||
Dim oSurname = User.Surname.EscapeForSQL()
|
Dim oSurname = User.Surname
|
||||||
Dim oUsername = User.samAccountName.EscapeForSQL()
|
Dim oUsername = User.samAccountName
|
||||||
Dim oEmail = User.Email.EscapeForSQL()
|
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 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)
|
Dim oResult = _mssql.ExecuteNonQuery(oSQL)
|
||||||
@@ -237,9 +237,9 @@ Namespace SyncUsers
|
|||||||
Dim oUserId As Integer = GetUserId(User.samAccountName)
|
Dim oUserId As Integer = GetUserId(User.samAccountName)
|
||||||
If Not IsNothing(oUserId) Then
|
If Not IsNothing(oUserId) Then
|
||||||
If oUserId > 0 Then
|
If oUserId > 0 Then
|
||||||
Dim oPrename = User.GivenName.EscapeForSQL()
|
Dim oPrename = User.GivenName
|
||||||
Dim oSurname = User.Surname.EscapeForSQL()
|
Dim oSurname = User.Surname
|
||||||
Dim oEmail = User.Email.EscapeForSQL()
|
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 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)
|
Dim oResult = _mssql.ExecuteNonQuery(oSQL)
|
||||||
|
|||||||
Reference in New Issue
Block a user