Re: Help needed with Report Temporary Tables
Posted in 1996
I suspect your problem is not that the temp tables are dropped but that the ROLLBACK statement closed the insert cursor which the report is using. Take a look at the generated ESQL/C code to find out what the INSERT code in the report does -- but I don't suppose it includes WITH HOLD. I suppose this could be regarded as a bug. It could be a bug in your code -- why are you doing rollbacks within the scope of a report -- or in I4GL -- why doesn't it protect itself from code like yours. The simple answer to the latter is: when it was first written, there were no cursors WITH HOLD, and subsequent maintenance work didn't conceive of a situation where it would matter, and didn't change the previous behaviour. The workaround, if you can call it such, it to hack the ESQL/C code before it is translated into C so that the insert cursor is declared WITH HOLD. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: matt@mattward.demon.co.uk (Matt Ward) }Date: Fri, 25 Oct 1996 17:56:09 GMT }X-Informix-List-Id: <news.29754> } }I have a 4gl program which does the following } }START REPORT xx to "xx" } }OUTPUT TO REPORT xx .... }... } BEGIN WORK } } ... } OUTPUT TO REPORT xx . . . . } } IF . . . . THEN } ROLLBACK WORK } END IF } }FINISH REPORT xx } }REPORT xx } ... } ORDER BY . . . . }END REPORT } }The problem is that I cannot select the data for the report in the }correct order (so that I can use order external by), and some records }are updated and then rolled back due to conditions on other records. }The rollback seems to cause the TEMP tables, created by informix to }reorder the report data, to be dropped, which I didn't think should }happen. This causes the report to produce no output (I have tested }with order external by and it works ok) } }Is this supposed to happen, or is there a work-arround } }This is on Informix 7.10 under HPUX 10