prevent interpretation of special characters in enter-query mode
ba-1983Feb 17 2009 — edited Feb 17 2009 My problem goes as follows:
- forms version: Forms [32 Bit] Version 6.0.8.10.3 (Production)
- non-database item block.X, char
- block.X is filled in post-query trigger. The post-query logic cannot be integrated in a view because it uses procedures, and usage of a pipelined function + view is currently not allowed due to "internal restrictions". Put simply: all logic to fill the field must remain in the post-query trigger
- user wants the field to be queryable. This is achieved by storing the entered criterium in a variable in the pre-query trigger, and using it in the post-query trigger to exclude records. E.g.
pre-query ==> help_block.query_X := block.X;
post-query ==> if help_block.query_X is not null and block.X is null or not block.X like help_block.query then raise form_trigger_failure; end if;
- this works fine for "regular" search strings. However:
- whenever the search string starts with <, <=, >, >=, !, forms seems to interpret the leading characters before doing anything else. During pre-query, block.X is null, and as soon as I use it in pl/sql, I get FRM-40831: Truncation Occured: value too long for field. E.g.
user puts the following in block.X ==> '<X', so he wants to search for records with value '<X' (text; not 'smaller than ...')
pre-query => msg.show(block.X) ==> appears to be empty/null, but right after the message, I get FRM-40831 Truncation Occured: value too long for field ...
This only happens if < is the first non-space character in the search string.
Does anyone know of a way to prevent oracle from interpreting the <, <=, ... characters entered in enter-query mode?