On Tue, 22 Feb 2005, SG Edwards wrote:
> I'm tyring to use the Perl::DBI module to connect to a postgreSQL database but
> it doesn't seem to like it?
I'm using this with perl 5.6.1 DBI and postgreSQL 7.2.4. I forget which
DBD.
my $connect_string = 'dbi:Pg:dbname=mode_db;user=mode_user';
$dbh = DBI->connect($connect_string)
or die "Got error $DBI::errstr when connecting to database\n";
This is for a backend cron job, hence it can just die if it fails.
The password isn't needed in my case, I trust localhost users. Basically
you just have to play with it, trying different ways until it works.
brew
==========================================================================
Strange Brew (brew@theMode.com)
Check out my Stock Option Covered Call website http://www.callpix.com
and my Musician's Online Database Exchange http://www.TheMode.com
==========================================================================