On Tue, Dec 03, 2002 at 02:03:49AM -0800, Timothy Johnson wrote:
> 
> You never actually "use" your DataBase Driver, so DBI has no idea how to do
> what you've asked.  I think this is what the error message is trying to tell
> you.  Try installing DBD::ODBC and then putting the line "use DBD::ODBC" at
> the top of your script after" use DBI".

No. You don't need to do that. The first parameter to DBI->connect(...) tells
the DBI which driver to load for you.

Tim.

> -----Original Message-----
> From: Thomas A. Lowery [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 7:50 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Connecting MS Access Database with DBI
> 
> 
> On Mon, Dec 02, 2002 at 09:37:58PM -0600, jad wrote:
> > I have Active State Perl 5.6.  I've used PPM install DBI.  I'm using 
> > this code:
> 
> Did you install DBD-ODBC?
> 
> > #
> > # Perl script that talks with the Northwinds database using an
> > # ODBC DSN of Northwind.
> > #
> > 
> > use DBI;
> > use Data::Dumper;
> > 
> > my $dbh = DBI->connect( "dbi:ODBC:Northwind", "Admin", "",
> >     {RaiseError => 1, PrintError => 1, AutoCommit => 1} ) or
> > die "Unable to connect: " . $DBI::errstr . "\n";
> 
> This looks fine.
> 
> > I get this error: Can't locate object method "p" via package "DBI::db" 
> > (perhaps you forgot to load "DBI::DB"?) at test.pl line 21.
> 
> -- 
> Thomas A. Lowery
> See DBI/FAQ http://www.xmlproj.com/cgi/fom.cgi

Reply via email to