Escape Character in ODBC Connections?? HELP!
432625Jun 2 2005 — edited Jun 3 2005Hi All,
I have a problem : we have a C++ app here that is supposed to attach to an Oracle 8i or 9i database here via a standard ODBC connection.
When this app attempts to do something like this:
INSERT INTO MyTable (MyRow) Values('[testing]')
it fails - it does not like the square brackets in the command. when I copy this into SQL Plus, of course, it runs just fine.
the ODBC link also doesn't like this:
INSERT INTO MyTable (MyRow) Values('/[testing/either
or this:
INSERT INTO MyTable (MyRow) Values('[[testing]either
or this:
INSERT INTO MyTable (MyRow) Values('`testing`') either
in fact, it appears the following are all reserved characters that oracle's ODBC driver can't handle:
` ' " \ / [ ]
My questions are :
1) Can I find a definitive list of these (Oracle documentation is good on reserved WORDS, but poor on reserved CHARACTERS)
2) what can I use to set an escape character within my ODBC SQL? Is this something I can tweak on the ODBC DSN cofiguration? I know in SQL*Plus you can just say
SET ESCAPE ON
SET ESCAPE "\"
But you can't do that on every SQL Query getting sent through ODBC can you?
Please help!
I