Re: Problem in connecting the DB
- From: mchase@xxxxxxxxxxxxx (Michael A Chase)
- Date: Thu, 21 Apr 2005 18:15:33 -0700
On 04/21/2005 06:46 AM, jagatheesh.ramakrishnan@xxxxxxx said:
....I am facing poblem in connecting a database thru perl program
Here are the details about the packages which i installed in my Windows machine
ppm> describe dbd-oracle ======================================================================= Name: DBD-Oracle Version: 1.12 Author: Tim Bunce (dbi-users@xxxxxxxx) Title: DBD-Oracle Abstract: Oracle database driver for the DBI module Location: ActiveState Package Repository Available Platforms: 1. MSWin32-x86-multi-thread =========================================================================== ppm> describe dbi Name: DBI Version: 1.48 Author: Tim Bunce (dbi-users@xxxxxxxx) Title: DBI Abstract: Database independent interface for Perl Location: ActiveState PPM2 Repository Available Platforms: 1. MSWin32-x86-multi-thread-5.8 ==================================================================================================================== Script which i was trying to run:
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:oracle:tar',
'scott',
'tiger',
) || die "Database connection not made: $DBI::errstr";
$dbh->disconnect;
While running the above script i am getting the following error
C:\>perl "C:\Documents and Settings\Administrator\Desktop\connect.pl"
install_driver(oracle) failed: Can't locate DBD/oracle.pm in @INC (@INC contains
: C:/Perl/lib C:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'oracle' isn't right.
Available drivers: DBM, ExampleP, File, ODBC, Proxy, Sponge.
at C:\Documents and Settings\Administrator\Desktop\connect.pl line 3
The problem is exactly what it says (perhaps the capitalisation of 'oracle' isn't right), you don't have DBD::oracle installed. The correct DSN string is "dbi:Oracle:tar". Note the capital 'O'.
-- Mac :}) ** I usually forward private questions to the appropriate mail list. ** Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. .
- References:
- Problem in connecting the DB
- From: Jagatheesh Ramakrishnan
- Problem in connecting the DB
- Prev by Date: Re: Problem in connecting the DB
- Next by Date: Re: inserting data coming from a hash
- Previous by thread: Re: Problem in connecting the DB
- Next by thread: Troubleshooting DBI/ODBC/Access
- Index(es):
Relevant Pages
|