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.
Tim.