On Friday 18 June 2004 08:04, Elijah O. Alcantara wrote:
> I don't get it, I followed the DBI examples from
> http://www.saturn5.com/%7Ejwb/dbi-examples.html and got this error:
>
> $ perl testing.pl
>
> DBI connect('GovPH2','postgres',...) failed: (no error string) at
> testing.pl line 7
> Database Connection failed!!!: ERROR: Missing '=' after 'GovPH2' in
> conninfo at testing.pl line 7.
>
>
> Here's the short code:
> -----
> #!/usr/bin/perl
>
> use strict;
> use warnings;
> use DBI;
>
> my $dbh = DBI->connect('DBI:Pg:GovPH2',
> 'username',
> 'password',
> ) || die "Database Connection failed!!!:
> $DBI::errstr";
>
> $dbh->disconnect();
> ------
From DBD::Pg documentation:
$dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$host;port=$port;" .
"options=$options;tty=$tty", "$username",
"$password");
greetings
--
Zhivko Duchev
===================================================
Institute for Animal Breeding
Mariensee 31535 Neustadt Germany
===================================================