Can't filter on a field name that contains a single quote.
Posted: Fri 27 Jan 2017 15:21
It appears that the Filter property of ODAC datasets can't handle field names with single quotes. A simple example would be:
select 'Testing' from dual; (Field name will be 'Testing' with the single quotes.)
But setting the Filter properly to "TESTING' = 'Testing'" does not appear to work (internally the single quotes are stripped.)
Another example might be:
select 'Testing' "Mark's Field" from dual;
Setting the Filter properly to Mark's Field = 'Testing' will cause an error.
From looking at the code it looks like we can add square brackets around the name field, but unfortunately the single quotes still cause problems.
Thanks for any tips or thoughts.
select 'Testing' from dual; (Field name will be 'Testing' with the single quotes.)
But setting the Filter properly to "TESTING' = 'Testing'" does not appear to work (internally the single quotes are stripped.)
Another example might be:
select 'Testing' "Mark's Field" from dual;
Setting the Filter properly to Mark's Field = 'Testing' will cause an error.
From looking at the code it looks like we can add square brackets around the name field, but unfortunately the single quotes still cause problems.
Thanks for any tips or thoughts.