I am using Win32::ODBC to connect to a database located on the C: drive of my computer. I have set up a file dsn through the administrator tools->ODBC tool in the control panel to point to the database with the microsoft access driver. Everytime I use the code
$DSN = "po.dsn";
#Connect to PO DB
$db=new Win32::ODBC($DSN) or die "couldn't open Purchase Order DB: $DSN because ", Win32::ODBC::Error(), "</br>";
The die statment prints out:
couldn't open Purchase Order DB: po.dsn because 911[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</br> at C:\Inetpub\Scripts\templete.pl line 15.
I have saved the dsn under C:\Program Files\Common Files\ODBC\Data Sources.
Can anyone tell what I am doing wrong?
$DSN = "po.dsn";
#Connect to PO DB
$db=new Win32::ODBC($DSN) or die "couldn't open Purchase Order DB: $DSN because ", Win32::ODBC::Error(), "</br>";
The die statment prints out:
couldn't open Purchase Order DB: po.dsn because 911[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</br> at C:\Inetpub\Scripts\templete.pl line 15.
I have saved the dsn under C:\Program Files\Common Files\ODBC\Data Sources.
Can anyone tell what I am doing wrong?