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

Reply via email to