Solved

can't locate object method "USE" via package  "strict"

Posted on 2003-11-01
17
2,040 Views
Last Modified: 2013-11-19
an't locate object method "USE" via package  "strict"  

when i am running script to connect oracle


pls help me to get rid of the problem

platform : linux 7.3
oracle 9.2
i installed oracle DBI driver



Javed
Riyadh
0
Comment
Question by:javeddba
  • 8
  • 4
  • 4
  • +1
17 Comments
 
LVL 10

Expert Comment

by:rj2
ID: 9665460
Change use to lowercase
use strict;
0
 

Author Comment

by:javeddba
ID: 9665548
Can't  locate DBD/Oracle.pm

what are the requiremnts for perl driver installation . i installed DBD-Oracle-1.14.
i followed the following steps


perl Makefile.pl
make test
make install


pls suggest me what is the problem. mention what is to be considered.

awaiting for your reply

Javed
0
 
LVL 10

Expert Comment

by:rj2
ID: 9665554
Try to download and install DBI first and then reinstall DBD-Oracle-1.14
http://search.cpan.org/~timb/DBI-1.38/
http://search.cpan.org/~timb/DBD-Oracle-1.14/
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 10

Expert Comment

by:rj2
ID: 9665562
Run these commands as root after you have downloaded
perl Makefile.pl
make
make test
make install
0
 
LVL 1

Expert Comment

by:seesik
ID: 9668922
Javed, you don't need to explictly "use DBD::Oracle"; just use DBI, and it will automagically load the driver that you specify in your connect() parameters.
0
 

Author Comment

by:javeddba
ID: 9669147
when i am installing DBI-1.38 i am getting following errors

the optional PlRPC-modules are not installed


0
 
LVL 10

Expert Comment

by:rj2
ID: 9669265
That doesn't really sound like an error, more like information.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9669385
could you please post the error message verbatim
and the program/script which produces this message
0
 

Author Comment

by:javeddba
ID: 9669394
when i am runing perl script following error

can;t locate DBD/oracle.pm

perhaps DBD::oracle perl module hasn't  fully installed .

pls specify how to deintall DBD and DBI  . i installed both on the serevr (test) . i want to de install and i will try installing fresh.

and pls specify how to install successfully and what are the pre-requisites.

Javed
0
 

Author Comment

by:javeddba
ID: 9669437
My error Messages are

" can't locate DBD/oracle.pm ........ line 3"

perhaps DBD::oracle perl module hasn't  fully installed
or perhaps the capitalization of  'oracle' isn't right .
available drivers ExampleP,Oracle,Proxy.Sponge
at line 3"

my code to test is

use strict;
use DBI;
my $dbh=DBI->connect('DBI:oracle:HAIF','system','manager') || die " Database connection not made: $DBI::errstr";
$dbh->disconnect;
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9669439
you don't need to deinstall.
I'd simply do folloing:

perl -MCPAN -eshell
  cpan> install DBI
  cpan> install DBI::Oracle
0
 

Author Comment

by:javeddba
ID: 9669447
perl -MCPAN -eshell
 not getting accessed pls specify how to do

Javed
0
 

Author Comment

by:javeddba
ID: 9669488
you can come on chat with me on yahoo : javedocp@hotmail.com     MSN: haifdba@hotmail.com
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9669556
> not getting accessed
what does this mean?
please post anything you type and anything the system responds verbatim
copy&paste could not be that complicated
Makes things simple here.
0
 

Author Comment

by:javeddba
ID: 9669604
actually i not having the net connection from the server.:

install_driver(oracle) failed : Can't locate DBD/oracle.pm in @INC( @INC contains : /usr/lib/perl5/5.6.1......)

at (eval) line 3
perhaps DBD::oracle perl module hasn't  fully installed
or perhaps the capitalization of  'oracle' isn't right .
available drivers ExampleP,Oracle,Proxy.Sponge
at line 3"

Javed
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 125 total points
ID: 9669722
the error sounds like you used:
  use DBI::oracle;
as said before: you don't need that.
Or you used 'oracle' as driver name, then try 'Oracle'
0
 

Author Comment

by:javeddba
ID: 9677499
Thanks ahoffmann
i resolved the issue  . thanks for yoyr support.


if any problem i will contact you pls mention your mail id .
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question