View Single Post

   
  #1 (permalink)  
Old 04-20-2008, 08:23 AM
comp.databases.informix
 
Posts: n/a
Default ISPY and DBD:Informix

I ran into a problem where $sth->err was not being set to the
appropriate Informix SQL error. It was always being set to undef. This
only happens when I was using an ISPY server. If I run the exact code
and point it to the actual Informix server, $sth->err gets set correct.
Here is some of the dbi trace output. It shows the SQL error, and that
->err is being set to undef.

***ERROR***
SQL: -239: Could not insert new row - duplicate value in a UNIQUE INDEX
column.
ISAM: -100: ISAM error: duplicate value for a record with unique key.
<<-- DBD::Informix::dbd_ix_exec()
<<-- DBD::Informix::dbd_ix_st_execute()
<- execute('92' '100001533899' ...)= undef at micro_upd.pl line 68
<- err= undef at micro_upd.pl line 69

Here is the actual code.


$sth_ins->execute($order_id,$serial_num,$man_date,$phone,$s tatus,$last_update_y4md.$last_update_hms);
print "inserted ",$rows ,"
xxxxxxx",defined($sth_ins->err)?" defined":" not defined","\n";
if ($sth_ins->err()) {
print "ERROR-INS:",$DBI::err,"
:$order_id,$man_date,$phone,$status,$last_update_y 4md.$last_update_hms,$serial_num\n";
$ins_errors++;
}else{
$rows_ins=$rows_ins+$sth_ins->rows;
}


I am using DBI 1.35, DBD 2003.04 and perl 5.8.0 on AIX 5.2 using
informix 9.30 uc7.

Rick

Reply With Quote