Howdy!
On Tue, Feb 25, 2003 at 09:46:07PM +0000, Tim Bunce wrote:
> On Tue, Feb 25, 2003 at 03:14:24PM -0500, Michael Houghton wrote:
> > Howdy!
> >
> > I'm trying to write a WARN handler for an Informix application.
> > I want to be able to get to stuff in the SQLCA, which, if I read
> > things correctly, means I need the statement handle for the offending
> > action.
> >
> > I have not figured out how to get that without resorting to a global-
> > like variable.
> >
> > Is there some secret handshake that will let me obtain the last statement
> > handle that was invoked?
>
> $DBI::lasth
>
> will give you the last handle used to make a DBI call.
> But if that was a statement handle that's now been destroyed
> it'll return the parent dbh instead.
>
I had seen that variable, but had not yet researched it's use, etc.
It sounds like exactly what I want; I think the statement handle wil
still be valid when I am in the WARN handler (since I am looking to
use PrintError to get me there).
Thanks! I'll give this a shot.
yours,
Michael
--
Michael and MJ Houghton | Herveus d'Ormonde and Megan O'Donnelly
[EMAIL PROTECTED] | White Wolf and the Phoenix
Bowie, MD, USA | Tablet and Inkle bands, and other stuff
| http://www.radix.net/~herveus/