vdubjunkie has asked for the wisdom of the Perl Monks concerning the following question:
I've seen this error addressed plenty of times, but none of the answers have seemed to offer me any real assistance. Firstly, I can open this db in Access with no problem.
So, with the code below, I get the response listed below it.
#!"c:\documents and settings\user\perl\bin\perl" use DBI; use strict; my $adb = 'testdb.mdb'; my $driver = 'driver=Microsoft Access Driver(*.mdb);dbq='; my $dstring = $driver . $adb; my $dbh = DBI->connect("DBI:ODBC:$dstring","",""); # || die; # "$DBI::errstr"; my @avail = DBI->available_drivers; print "--$_--\n" foreach(@avail); my %drivers = DBI->installed_drivers(); while (my($k,$v)=each(%drivers)) { print "Driver:$k\t-\t$v\n"; } $dbh->disconnect;
Any help with this is GREATLY appreciatedDBI connect('driver=Microsoft Access Driver(*.mdb);dbq=testdb.mdb','', +.. .) failed: [Microsoft][ODBC Driver Manager] Data source name not found + and no de fault driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at + C:\temp\t emp.pl line 14 --DBM-- --ExampleP-- --File-- --Gofer-- --ODBC-- --Proxy-- --SQLite-- --Sponge-- Driver:ODBC - DBI::dr=HASH(0x1a4d5c4) Can't call method "disconnect" on an undefined value at C:\temp\temp.p +l line 27.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MS Access database problem
by tachyon-II (Chaplain) on Nov 30, 2007 at 02:57 UTC | |
by vdubjunkie (Novice) on Nov 30, 2007 at 13:28 UTC | |
by tachyon-II (Chaplain) on Dec 01, 2007 at 04:16 UTC | |
|
Re: MS Access database problem
by roboticus (Chancellor) on Nov 29, 2007 at 16:28 UTC | |
by vdubjunkie (Novice) on Nov 29, 2007 at 16:50 UTC | |
by roboticus (Chancellor) on Nov 29, 2007 at 17:20 UTC | |
by vdubjunkie (Novice) on Nov 29, 2007 at 19:15 UTC | |
by roboticus (Chancellor) on Nov 30, 2007 at 03:29 UTC | |
| |
by vdubjunkie (Novice) on Nov 29, 2007 at 21:46 UTC | |
|
Re: MS Access database problem
by rhesa (Vicar) on Nov 29, 2007 at 22:39 UTC |