I'm trying to learn how to use DBI, but I can't get pass the connect
method.
I'm using:
my $dbh = DBI->connect('DBI:ODBC:Northwind','admin','password');
The part I'm not sure about is the datasource.
Everytime I get:
DBI connect('Northwind','admin',...) failed: [Microsoft][ODBC Driver
Manager] Da
ta source name not found and no default driver specified (SQL-IM002)
(DBD: db_log
in/SQLConnect err=-1) at dbi_test.pl line 3
OR:
DBI connect('Northwind','admin',...) failed: [Microsoft][ODBC Driver
Manager] Da
ta source name not found and no default driver specified (SQL-IM002)
(DBD: db_log
in/SQLConnect err=-1) at dbi_test.pl line 3
I've tried many different things, such as using the full paths for the data source name. I have even tried moving the odbc driver and database into my current working directory.
Thanks in advance for any help,
Nick
method.
I'm using:
my $dbh = DBI->connect('DBI:ODBC:Northwind','admin','password');
The part I'm not sure about is the datasource.
Everytime I get:
DBI connect('Northwind','admin',...) failed: [Microsoft][ODBC Driver
Manager] Da
ta source name not found and no default driver specified (SQL-IM002)
(DBD: db_log
in/SQLConnect err=-1) at dbi_test.pl line 3
OR:
DBI connect('Northwind','admin',...) failed: [Microsoft][ODBC Driver
Manager] Da
ta source name not found and no default driver specified (SQL-IM002)
(DBD: db_log
in/SQLConnect err=-1) at dbi_test.pl line 3
I've tried many different things, such as using the full paths for the data source name. I have even tried moving the odbc driver and database into my current working directory.
Thanks in advance for any help,
Nick