CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI: Windows 7, MS Access 2013, DBI question: Edit Log



PapaGeek
User

Feb 24, 2014, 7:43 AM


Views: 23778
Windows 7, MS Access 2013, DBI question

(There is an answer to this question further down this thread!)

This is my first attempt to access a database with Perl. I have MS Access 2013 on my Windows 7 PC and I am used to working with it. I created a database using access. The filename is testDB.accdb.

I found the following code on line and gave it a try.

Code
use Modern::Perl '2013'; 

my $dbLocation = 'C:\Users\Sandy\Documents\TestDB.accdb';
my $connectAccess = "Driver={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=$dbLocation ";
my $dbAccess = DBI->connect("dbi:ODBC:$connectAccess") or die $DBI::errstr;


and I got the following errors:


Code
Name "DBI::errstr" used only once: possible typo at 
C:/Users/Sandy/workspace/Quickie/QuickTest.pl line 5.
Can't locate object method "connect" via package "DBI" at
C:/Users/Sandy/workspace/Quickie/QuickTest.pl line 5.


Iím a relative newbie to Perl, what am I missing?


(This post was edited by PapaGeek on Feb 25, 2014, 4:26 AM)


Edit Log:
Post edited by PapaGeek (User) on Feb 25, 2014, 4:26 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives