Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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
Replies are listed 'Best First'.
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 making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-07-30 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls