kevind0718 has asked for the wisdom of the Perl Monks concerning the following question:
Perl is actually blowing up. First time I have seen that. Makes me sad.use DBI; my $dsn = "dbi:Pg:dbname='benchmark_c';host='localhost'" ; my $dbname = 'benchmark_c'; my $host = 'localhost' ; my $port = '5432'; my $uname = "postgres"; my $pword = "postgres"; #** ** $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$host;port=$por +t", "$uname", "$pword"); #** ** $dbh = DBI->connect("dbi:Pg:dbname=$dbname", "$uname", "$pword" +); $dbh = DBI->connect("dbi:Pg:dbname='benchmark_c';host='localhost'", "' +postgres'", "'postgres'"); print "connected"; $stmt = $dbh->prepare("select appsyskey from appsys where upper(appsys +name) = 'LOAD LEHMAN TRADES'"); $stmt->execute(); my $rslts = $stmt->fetchrow_hashref(); my $appsyskey = $rslts->{'appsyskey'}; print $appsyskey;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: connecting to postgresql with DBI
by Corion (Patriarch) on Mar 20, 2008 at 21:14 UTC | |
|
Re: connecting to postgresql with DBI
by runrig (Abbot) on Mar 20, 2008 at 21:35 UTC | |
by kevind0718 (Scribe) on Mar 20, 2008 at 23:40 UTC | |
by Anonymous Monk on Mar 31, 2008 at 15:44 UTC | |
|
Re: connecting to postgresql with DBI
by holli (Abbot) on Mar 20, 2008 at 22:53 UTC | |
by kevind0718 (Scribe) on Mar 20, 2008 at 23:54 UTC | |
by runrig (Abbot) on Mar 21, 2008 at 00:05 UTC | |
by kevind0718 (Scribe) on Mar 24, 2008 at 16:04 UTC | |
by Anonymous Monk on Mar 21, 2008 at 14:30 UTC | |
by menolly (Hermit) on Mar 21, 2008 at 17:17 UTC |