hi

this is the smallest part of my code.

**************************************************
#!/usr/bin/perl -w
#this is test.pl

use strict;
use DBI;

my $dbname = 'dcm_server';
my $datasource = 'dbi:Pg:dbname=dcm_server';
my $username = 'anshu';
my $auth = 'anshu';
my $host = '192.168.0.2';

print "Trying to connect to database\n";
my $dbh = 
DBI->connect("dbi:Pg:dbname=$dbname;host=$host;","$username","$auth",{AutoCommit=>0});

if ($dbh) { # If successfully connected
  print "Connected to database\n";}
else {
  print "Error Connecting to database\n";}

****************************************************

the error is  :
Can't locate object method "connect" via package "DBI" at test.pl line 14.

I have recently upgraded my system RHLinux 6.2 -> RHLINUX 7
this upgradation made following changes
PostgreSQL 6.5 -> 7
Perl 5 -> perl 5.6.0
I installed DBI(1.14) and DBD manually.

Before upgradation, my code was performing very well.

Can you help me out?

Regards

Anshuman
[EMAIL PROTECTED]


>From: "Sterin, Ilya" <[EMAIL PROTECTED]>
>To: anshuman das <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: Can't locate objrect method "connect" via package "DBI"
>Date: Thu, 5 Jul 2001 22:21:07 -0400
>
>Well let see the code, versions of DBI/DBD.
>
>Ilya
>
> > -----Original Message-----
> > From: anshuman das [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 05, 2001 4:12 AM
> > To: [EMAIL PROTECTED]
> > Subject: Can't locate objrect method "connect" via package "DBI"
> >
> >
> > Hi
> >
> > I have upgraded my machine as following
> >
> > RHLinux 6,.2 --> 7.0
> > PostgreSql 65. --> 7.0
> > Perl 5 -->Perl 5.6
> >
> > I have installed DBI & DBD again after the upgradation.
> > My problem is my old perl codes (which were running perfectly before
> > upgradation) uses connect are not running. It can't connect postgresql
> > databse through DBI. The error is ---
> > Can't locate objrect method "connect" via package "DBI"
> >
> > I posted this letter earlier, somebody asked me wheather I used
> > use DBI. THe
> > answer yes, I mentioned that MY CODES WERE RUNNING PERFECTLY BEFORE
> > UPGRADATION.
> >
> > Please help.
> >
> > Anshuman Das
> > [EMAIL PROTECTED]
> > 
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at 
>http://www.hotmail.com.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Reply via email to