--- Tim Bunce <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 27, 2002 at 09:35:53AM -0700, Thomas
> Hilbig wrote:
> > --- Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > [deleted]
> > > $dbh->{Driver}->{CachedKids}
> > > [deleted]
> > > Tim.
> >
> > Thanks Tim. That really threw me off -- but it
> > worked!
> > I was expecting to find information on all handles
> in
> > the DBI, and not any one of the handles. But
> thanks,
> > it did work and now I have the option of using it.
>
> > Unfortunately, since I can't tell if the handle's
> > connection was reused vs. re-established I will
> still
> > have to set my NLS environment after the
> > $dbh->connection_cached.
>
> Just do:
>
> $dbh = DBI->connect_cached(...);
> unless ($dbh->{private_I_have_done_nls}) {
> $dbh->do("...");
> $dbh->{private_I_have_done_nls} = 1;
> }
>
> Tim.
Tim,
That works nicely.
I was concerned that a handle (pointer) might actually
be re-cycled when the dbh->connect_cached
reestablishes a dropped session. That doesn't seem to
be the case: an experiment where the code looped
through a $dbh->connect_cached while I manually killed
the session from the back-end properly resulted in an
undefined $dbh->{private_I_have_done_nls}.
Tom
"Just $dbh->do It!"
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com