Aggiunti caratteri di escape se nel campo Note vengono inseriti i caratteri \, ', ", %
This commit is contained in:
@@ -322,7 +322,9 @@ Public Class UpdateKeyPageVM
|
||||
End If
|
||||
If Not IsNothing(Note) Then
|
||||
' Aggiorno tabella Key con KeyDate scelto
|
||||
Dim Query As String = "UPDATE " & DB_KEY & " SET " & DB_NOTE & " = '" & m_Note & "' WHERE " & DB_LOCKID & " = '" & Key.LockID & "' "
|
||||
Dim Query As String = "UPDATE " & DB_KEY &
|
||||
" SET " & DB_NOTE & " = '" & m_Note.Replace("\", "\\").Replace("'", "\'").Replace("""", "\""").Replace("%", "\%") &
|
||||
"' WHERE " & DB_LOCKID & " = '" & Key.LockID & "' "
|
||||
Query = Query.TrimEnd(","c, " "c)
|
||||
|
||||
ManageDb.ExecuteQuery(Query)
|
||||
|
||||
Reference in New Issue
Block a user