in reply to Re: win32::odbc error
in thread win32::odbc error

like below

if (!($db = new Win32::ODBC("DSN=Book;UID=$user;PWD=$pwd;"))) { print "error message"; } else { $statement="query"; $db->Sql($statement); <continue other stuff> }

Replies are listed 'Best First'.
Re^3: win32::odbc error
by tdane (Acolyte) on Dec 01, 2009 at 22:11 UTC

    And is that DSN defined in Control Panel->Administrative Tools->Data Sources (ODBC)?

    If it is and you can hit the "Test Data Source" button and it works, then you have exhausted my expertise. Basically, that error message looks to me like that DSN isn't working. Be careful about user issues. Is it a User DSN, a System DSN, or a File DSN?

    If the DSN works in the control panel test, your perl (as much as I have seen) should work. If it is a user DSN is your perl code running as the same user who onns the DSN specification?