On Mar 31, 2009, at 8:23 AM, Martin Evans wrote:

Martin Gainty wrote:
the error states your DSN is incorrect
if you fix DSN name to already configured DSN this should work..
Martin

That is just because DBD::ODBC calls SQLDriverConnect first (since it accepts DSN=xxx and is way more flexible) but if that fails it goes on to try SQLConnect - which in this case worked. You can avoid the wasted call by using dbi:ODBC:DSN=XXX. DBD::ODBC has been like this for ages for some still very good reasons.

It is not why Lars is getting no errors or data - he did get connected and successfully issued the query and fetched no data.

If sqlplus DOES return data:

What version of Oracle ODBC and Oracle client are you using, and what version is oracle on the far end?

This is similar to some aggravating results I've gotten on my (admittedly) very esoteric system: connecting from Oracle 11 via database link to an RDB database made available via an RDB OCI server.

I have to use an ancient (1.17) version of DBD::Oracle or I get the very same results, a successful query with no rows returned (and I know there are rows there, if I build DBD:Oracle 1.17 against Oracle 8.1.7 libs it works...); sqlplus on my Oracle 11 system does return rows.

It's possible that the Oracle ODBC client is doing the same sort of thing to you.

--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs


Reply via email to