Hi,
We have a dynamic SQL application that been running solid on SE 7.2x for
Sun for about a year. We decided to make some changes the the DB and
added a few SERIAL fields. The production code used SELECT * and SET *
syntax and the SERIAL number fields broke this. After modifying the code
to limit the field lists to the non-SERIAL fields we are close to working
again. The current problem is an error 401 attempting to update a certain
table. This table has both a SERIAL fields and associated triggers. The
ESQL code appears to be correct and works when accessing other tables.
The associated triggers are not fully tested, but also appear to work. Is
it possible that the 401 is occurring because of a failure in the trigger
or must it be something in the ESQL code? FWIW, according to the manual
401's should not occur after v5.0.
Here's an extract from our logs showing the showing the code sequence that
leads up to the failure:
PREPARE prod_comp0T FROM SELECT
prod_id,prod_wo,prod_ls,prod_oper,prod_uom,prod_comp_qty,prod_mach_time
FROM informix.prod_comp WHERE ROWID = ? FOR UPDATE
DECLARE CURSOR prod_comp0F FOR prod_comp0T
PREPARE prod_comp0U FROM UPDATE informix.prod_comp SET
(prod_id,prod_wo,prod_ls,prod_oper,prod_uom,prod_comp_qty,prod_mach_time)
= (?,?,?,?,?,?,?) WHERE CURRENT OF prod_comp0F
OPEN CURSOR prod_comp0F
FETCH NEXT prod_comp0F
EXECUTE prod_comp0U
EXECUTE prod_comp0U, sqlcode: -401.
Informix error. Fetch attempted on NULL cursor. (-401)
Any ideas?
Thanks
Steven
--
---------------------------------------------------------------
Steven Levine <steve53removethis@earthlink.net> MR2/ICE #10183
---------------------------------------------------------------