[CDBI] Access 2007

Andy Maginnis jam at smru.co.uk
Thu Sep 24 10:56:38 BST 2009


Hi,

I am having issues reading an Access 2007 database. The following line
of code

 

$dbh = DBI->connect("dbi:ODBC:driver=microsoft access driver
(*.accdb);dbq=C:\\SMRULtdProjectsdatabase1.accdb");

 

generates the error.

 

C:\>readPrjMasterTest.pl

Using database SMRU Ltd Projects database.mdb

DBI connect('driver=microsoft access driver
(*.accdb);dbq=C:\SMRULtdProjectsdatabase1.accdb','',...) failed:
[Microsoft][ODBC Driver Manager] Data source name n

ot found and no default driver specified (SQL-IM002) at
C:\readPrjMasterTest.pl line 21

Can't call method "prepare" on an undefined value at
C:\readPrjMasterTest.pl line 29.

 

When I convert the database to Ms2003 format all is well. I can
successfully read and access the data after using 

 

$dbh = DBI->connect("dbi:ODBC:driver=microsoft access driver
(*.mdb);dbq=C:\\SMRULtdProjectsdatabase.mdb");

 

I am using Activestate,  with DBI 1.609

This is perl, v5.10.0 built for MSWin32-x86-multi-thread

(with 9 registered patches, see perl -V for more detail)

Binary build 1005 [290470] provided by ActiveState
http://www.ActiveState.com

Built May 24 2009 12:17:36

 

Any ideas?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digitalcraftsmen.net/pipermail/classdbi/attachments/20090924/58f1814e/attachment.htm 


More information about the ClassDBI mailing list