Find with special character

kuseew

New Member
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.
 
This may not be the ideal solution but as no-one else has replied I will suggest it. Following the code you posted insert the lines:

IF AVAILABLE table THEN
ASSIGN veld = table.tablecode.


You thus replace the invalid characters with valid ones.
 
Back
Top