On Wed, Sep 25, 2002 at 11:31:11AM -0700, Thomas Hilbig wrote:
> I've sifted through the years of archives on how to
> tell if a prior database handle established using
> DBI->connect_cached exists or not. Any examples
> that I have found do not work for my needs. While the
> $dbh->{CachedKids} is useful for showing any cached
> statements when using $dbh->prepare_cached, I cannot
> get a similar function (DBI->{CachedKids} ??) to work
> at the driver level in order to see if a handle
> already exists.
$dbh->{Driver}->{CachedKids}
> My application is a persistent CGI application
> (Fast:CGI) that logs onto one of many databases based
> on the user's input. Using the $DBI->connect_cached
> is pooling the connections perfectly, but I also want
> to do some one-time session setup (the usual
> NLS_DATE_FORMAT stuff) for any new connections only.
> I can't find a way to see if the connection already
> exists. If there is a way, can someone give an
> example??
I'd subclass the DBI.
Tim.