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

Let me give you a little more. ODBC uses a "DSN" to identify the data resource to be connected to. This can be a name stored in the ODBC configuration or it can be a full ODBC connect string. There should be a line in your code that looks like this:

$db = new Win32::ODBC("someDSN");

or

$db = new Win32::ODBC("Driver={SQLServer};Server=Your_Server_Name;Data +base=Your_Database_Name;Uid=Your_Username;Pwd=Your_Password;");

And that you should check for success as well. If that call doesn't work, your $db reference won't be useful for anything.

Replies are listed 'Best First'.
Re^3: win32::odbc error
by Anonymous Monk on Dec 01, 2009 at 22:05 UTC
    Hi tdane,

    my connection is successful but the query getting failed. I don't know why. If I run the smae query in sql prompt it runs fine but the same query runs through win32::odbc fails.