While connecting to the msaccess database using perl . i'm gettting this error " cannot locate object method "CONNECT" via package"
this is my code
I'm unable to execute it Getting error o line no 3 .. please help..
my $db_file = 'E:\db\Foqa3.mdb';
my $dbh = DBI->connect('DBI:ADO:Provider=Microsoft.Jet.OLEDB.4.0;Data Source='.$db_file) or die $DBI::errstr;
$sqlstatement="SELECT CONFIGNAME FROM ACCONFIG";
$sth = $dbh->prepare($sqlstatement);
die "Could not execute SQL statement ... maybe invalid?";
#output database results
Then i read that DBD::ODBC came with activeperl 5 so i went into ppm, looked at all packages.. found dbd::odbc, right clicked and said install. it seemed to install but now i can't find it anymore on ethier the all packages or the installed packages.
when i try and run my perl script i get the following error:
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: C: /Perl/site/lib C:/Perl/lib .) at (eval 5) line 3. Perhaps the DBD::ODBC perl module hasn't been fully installed, or perhaps the capitalisation of 'ODBC' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.