Hi Again,
Now i through the problem with the folling connecting parameters...
my $dbh = DBI->connect('dbi:ODBC:oradsn','XXXKCP','XXXLL') || print
"Connection to database FAILED";
But still now i am facing the problems with the following code
my $dbh = DBI->connect('dbi:Oracle:oradsn','XXXKCP','XXXLL') || print
"Connection to database FAILED";
When i am Using 'dbi:Oracle:oradsn' i am getting the following error....
DBD::Oracle initialisation failed: Can't locate object method "driver" via
packa
ge "DBD::Oracle" at D:/Perl/site/lib/DBI.pm line 711.
Perhaps the capitalisation of DBD 'Oracle' isn't right. at dbop.pl line 7
COuld any body pls help me out in this regrding...
-----Original Message-----
From: Andy Hassall [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 12:40 AM
To: Thutika, Srinivas (ODC - Satyam); [EMAIL PROTECTED]
Subject: Re: Problems in DBI
Thutika, Srinivas (ODC - Satyam) wrote:
>> Hi ,
>>
>> I am new to DBI perl programming..
>>
>> I am trying to connect to Database as follows..
>>
>> #!/usr/bin/perl
>> print"start \n"print"start \n";
>> use strict;
>> use DBI;
>> my $dbh = DBI->connect('dbi:ODBC:oradsn','qqqqCP', ' wwqwqw ');
>>
>> I am getting the follwoing Error....
>>
> DBI connect('oradsn','KXBCP',...) failed: [Oracle][ODBC][Ora]Error
> while trying
> to retrieve text for error ORA-12154
> (SQL-08004)(DBD: db_login/SQLConnect err=-1) at dbop.pl line 6
This tends to mean you don't have ORACLE_HOME set, or for some reason the
driver can't access it to look up the message (since on Windows it's
supposed to be able to find the home by itself without having ORACLE_HOME
set). (Or your install is damaged in some way).
The error is "ORA-12154: TNS:could not resolve service name ", so
additionally your Oracle network settings are wrong, either in the DSN or in
tnsnames.ora.
(none of this is actually to do with DBI, it's all Oracle and ODBC setup)
--
Andy Hassall ([EMAIL PROTECTED]) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)