We work in Progress character-mode.
We have a lookup-table for "region". After user input, this input is looked up in that table to control existence of the user-input. The value “EUR” is in the table.
Using copy-paste a user can fill the update field with some other character like è (the french accent-grave) into the update-field. The find will be then looking for "èur”. The result is, that the table-value will be found, something that I do NOT expect, and do not want, because when the return of the find was good, the value is later on put in the database in some table, including the "èur”.
What can I do to prevent this situation ?
My code is as follows:
DEF VAR veld AS CHAR FORMAT "x(03)" NO-UNDO.
UPDATE veld.
FIND FIRST table WHERE tablecode = veld NO-LOCK NO-ERROR.
DISP tablecode tabledescription.
We have a lookup-table for "region". After user input, this input is looked up in that table to control existence of the user-input. The value “EUR” is in the table.
Using copy-paste a user can fill the update field with some other character like è (the french accent-grave) into the update-field. The find will be then looking for "èur”. The result is, that the table-value will be found, something that I do NOT expect, and do not want, because when the return of the find was good, the value is later on put in the database in some table, including the "èur”.
What can I do to prevent this situation ?
My code is as follows:
DEF VAR veld AS CHAR FORMAT "x(03)" NO-UNDO.
UPDATE veld.
FIND FIRST table WHERE tablecode = veld NO-LOCK NO-ERROR.
DISP tablecode tabledescription.