Re: Fetch the DBD driver type from a database handle?

From: Michael A Chase (mchase_at_ix.netcom.com)
Date: 11/18/04


Date: Thu, 18 Nov 2004 12:15:59 -0800
To: Daniel Kasak <dkasak@nusconsulting.com.au>

Quoting Daniel Kasak <dkasak@nusconsulting.com.au>:

> Michael A Chase wrote:
>
> >Quoting Daniel Kasak <dkasak@nusconsulting.com.au>:

> >>I'm writing some code that needs to be able to figure out what DBD
> >>driver is working with a current database *handle* ( so I can take
> >>advantage of more advanced features of some drivers ).
> >>
> >>How do I do that?
>
> >From DBI.pm:
> >====
> >Driver (handle)
> >Holds the handle of the parent driver. The only recommended use for this is
> to
> >find the name of the driver using:
> >
> > $dbh->{Driver}->{Name}
> >====

> Aha!
> Looking inside the source, eh?
> Makes sense. I was looking in the docs.
> Thanks :)

The documentation is in the source file. You can see it by running `perldoc
DBI` (without the quotes).

--
Mac :})