in reply to sql connectivity

I think this is the relevant error message: "Data source name not found and no default driver specified".

You've passed a filename as the DSN, but the docs say: "NOTE: MyDSN can be either the DSN as defined in the ODBC Administrator, or it can be an honest-to-God DSN Connect String."

If you look in your ODBC administrator for the name of your DSN (not the filename) you might have more luck.

You might want to give a little thought as to whether using Win32::ODBC is the way to go. I think most perl code uses DBI (or a layer over the top of DBI) as the database interface and there is a DBD::ODBC module to provide an ODBC back-end to DBI. There might be some ODBC-specific API calls in Win32::ODBC you need, though.

Using DBI might allow your code to be more portable (to other DBs or platforms) in the future.

Replies are listed 'Best First'.
Re^2: sql connectivity
by spatterson (Pilgrim) on Jan 05, 2007 at 14:35 UTC
    And DBI has a driver to access ODBC - DBD::ODBC

    just another cpan module author