RE: dbh connection information

2004-04-30 Thread Scott T. Hildreth
How about using a convenience method, $nm = $dbh->selectrow_array(q[select global_name from global_name]); print "\nThe instance is $nm\n" if $nm; On Fri, 2004-04-30 at 05:47, Srikanth Madani wrote: > TMTOWTDI and all that :-) - but please do correct me if this code is > inappropriate in some w

RE: dbh connection information

2004-04-30 Thread Srikanth Madani
TMTOWTDI and all that :-) - but please do correct me if this code is inappropriate in some way: #Assuming that the database handle $dbh is successfully defined. my $sth = $dbh->prepare ('SELECT global_name FROM global_name') || die "\n$0: Failed to prepare SQL statement: $dbh->errstr\n"; $sth->exe

Re: dbh connection information

2004-04-30 Thread Tim Bunce
On Fri, Apr 30, 2004 at 09:11:15AM +0200, Francesc Guasch wrote: > If I have the $dbh connected, how can I ask the connection > information ? I want to know the database name. Umm, name, that'll be $dbh->{Name} > I searched the perldoc DBI unsuccessfully, If I missed > something I'll be glad to h