[CDBI] Access 2007

Andy Maginnis jam at smru.co.uk
Thu Sep 24 12:41:47 BST 2009



Ive managed to fix this, simple syntax issue, when I use all is well.


$dbh = DBI->connect("dbi:ODBC:driver=microsoft access driver (*.mdb,


if you do not know about ODBC like me and need to check if you can
support accdb run


which will let you know what you can access. 





From: classdbi-bounces at svr02.digitalcraftsmen.net
[mailto:classdbi-bounces at svr02.digitalcraftsmen.net] On Behalf Of Andy
Sent: 24 September 2009 10:57
To: ClassDBI at svr02.digitalcraftsmen.net
Subject: [CDBI] Access 2007



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


$dbh = DBI->connect("dbi:ODBC:driver=microsoft access driver


generates the error.



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


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

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/4f025855/attachment.htm 

More information about the ClassDBI mailing list