In search of ParamValues in error handler after a do call fails
- From: martin.evans@xxxxxxxxxxxx (Martin J. Evans)
- Date: Tue, 27 Jun 2006 16:37:24 +0100 (BST)
Hi,
I am trying to locate the parameter values passed to a do method call in an
error handler called when the do method fails. I know about ParamValues
attribute but in this case I cannot locate a valid ParamValues array. All the
code uses a single connection handle. The code does:
begin transaction
prepare(select1)
execute(select1)
do(update1)
do(insert1)
do(insert2)
do(update2)
do(update3)
selectrow_array(select 2)
do(update4)
do(update5)
and finally
do (insert3) which fails.
The error handler is called with a db handle and what follows is all I can
currently find out:
msg passed to error handler indicates error on insert3
handle passed to error handler has:
value of DBIx::Log4perl::db=HASH(0x9b22398)
Type => db
Kids => 1
ActiveKids => 0
Statement => insert3 SQL
ChildHandles => 64 handles, 1 of which is non-null
Active => 1
DBI::lasth is DBIx::Log4perl::db=HASH(0x9b229f8)
! $DBI::lasth->{Statement} is select1 and not insert3
DBI::lasth->{Type} = db
The one sth in db's ChildHandles which is not null has:
Statement => select1
ParamValues => :p1 => '1' (which is correct for select1)
Active => undef
Executed => 1
So where are the ParamValues for insert3 - the actual "do" which failed?
Any ideas?
NOTE: I am using DBIx::Log4perl.
Thanks
Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com
.
- Follow-Ups:
- Prev by Date: Re: Possible to get field names and types in a table without executing a query?
- Next by Date: Re: Possible to get field names and types in a table without executing a query?
- Previous by thread: Possible to get field names and types in a table without executing a query?
- Next by thread: Re: In search of ParamValues in error handler after a do call fails
- Index(es):
Relevant Pages
|