http://www.perlmonks.org?node_id=300607


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

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.