Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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

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?
[Tanktalus]: Problem is, it's a test for another monk - as in, another monk letting me interview for his company :)
[Tanktalus]: He might see me here... :D
[Discipulus]: it's me? ;=)
[marioroy]: Lady_Aleena could it be a quoting issue? I just tried find with -exec on the command line. find . -name "*.pl" -exec ls -l {} \;
[Tanktalus]: No, I know who he is, nice try. But if you're hiring, let me know :)
[Tanktalus]: Lady_Aleena: yeah, I can reproduce your issue, it's confusing alright :)
[Tanktalus]: I'm sure it'll make perfect sense once we figure it out :)
[Lady_Aleena]: marioroy, not a quoting error. I can't run it on the command line. It is when I put it in qx() where it falls apart.
Discipulus hired to use Perl in Eataly? haired maybe
[choroba]: We're hiring

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-04-23 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.