Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oacle Driver (9.2) with 10g database & Access 2003 Pass Through Query 1

Status
Not open for further replies.

PCLewis

Programmer
Aug 11, 2005
271
NZ
Unfortunately I am only abe to use the 10g database I have access to and the "standard build" PC I am given which has the 9.2 Oracle client. To date this has not been a problem at all however my lack of background with Oracle means I don't know if my query should work or not with this configuration.

I have reduced the problem I have to the simplist test. I run the following fine in SQLPLUS but running it via the ORacle ODBC driver in a pass through query from Access 2003 gives me one of the ODBC -- call failed results.

Code:
SELECT CASE WHEN 1>0 THEN 'TRUE' ELSE 'FALSE' END AS TEST FROM DUAL;
[code]

I was hoping someone would either know that this ODBC driver does nto support the CASE WHEN structure or that something else is so obviously wrong.

Cheers
 
Any other query I have used has worked but anything involving the CASE structure fails. That is why I mentioned that I have reduced the problem down to the smallest factor.

The test case I usually use is SELECT sysdate FROM DUAL and yes, that works fine. The exact error is almost meaningless "Run-time error '-2147467259 (80004005) ODBC -- call failed." This generic error can mean several things but as I said, other queries work just fine so I know my pass through query syntax and function are ok.

Cheers
 
Did you pass that statement in single line? And did it really contain semicolon? Could you post exact piece of your (not only SQL) code?

Regards, Dima
 
Thanks for pointing out that the semi-colon can be an issue! I never actually realised that before. I copied and pasted my query from TOAD (which is not fussy about missing ; in the SQL Editor).

When I remove the ; form the statement it works fine.

Thanks for that and like I said...it might be something obvious to someone more experienced with using Oracle via ODBC :)

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top