CDurkin
14 years agoContributor
ADO reading parameters into SQL
I am sending some sql to Oracle which has double quotes inside a text string, fine no problem. However if there is a colan inside the double quotes then ADO throws a exception. The exception it throws indicated it thinks there is a parameter. The exception I get is:
"Parameter object is improperly defined. Inconsistent or incomplete information was provided"
Oracle has not problem with the SQL, this is a ADO problem. An simplified example of the SQL is:
var Qry = ADO.CreateADOQuery();
Qry.ConnectionString = getConnectionString();
Qry.SQL = "select '\" : \"' as text from dual";
Qry.Open();
Some other results to demo the problem are
ERROR> select ' " : " ' as text from dual
ERROR> select ' " : ' as text from dual
GOOD> select ' " " : ' as text from dual
GOOD> select ' " ' as text from dual
GOOD> select ' : ' as text from dual
"Parameter object is improperly defined. Inconsistent or incomplete information was provided"
Oracle has not problem with the SQL, this is a ADO problem. An simplified example of the SQL is:
var Qry = ADO.CreateADOQuery();
Qry.ConnectionString = getConnectionString();
Qry.SQL = "select '\" : \"' as text from dual";
Qry.Open();
Some other results to demo the problem are
ERROR> select ' " : " ' as text from dual
ERROR> select ' " : ' as text from dual
GOOD> select ' " " : ' as text from dual
GOOD> select ' " ' as text from dual
GOOD> select ' : ' as text from dual