Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: DBI driver name from database handle

by Abigail-II (Bishop)
on Oct 20, 2003 at 15:02 UTC ( #300607=note: print w/ replies, xml ) Need Help??


in reply to DBI driver name from database handle

Would

$dbh -> {Name}
provide the information you are after? If not, does
$dbh -> get_info (17)
?

Abigail


Comment on Re: DBI driver name from database handle
Select or Download Code
Re: Re: DBI driver name from database handle
by liz (Monsignor) on Oct 20, 2003 at 15:17 UTC
    $dbh->{Name} gives me the name of the database, rather than the database driver.

    3dan's way seems to be the correct one $dbh->{Driver}{Name}.

    Of course, when you try to do a each on the $dbh object, you don't get a listing of the possible values. Too bad.

    Liz

Re: Re: DBI driver name from database handle
by Anonymous Monk on Oct 20, 2003 at 15:18 UTC
    Would
    $dbh -> {Name}
    provide the information you are after?

    No.

    $dbh -> {Name} provides the name of the database used in the connection string.

    From DBI docs

    ""Name"" (string) Holds the "name" of the database. Usually (and recom­ mended to be) the same as the ""dbi:DriverName:..."" string used to connect to the database, but with the leading ""dbi:DriverName:"" removed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://300607]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-09-17 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (62 votes), past polls