Re: Error in a 4GL-report
Posted in 1995
} Subject: Error in a 4GL-report } Date: Wed, 05 Apr 95 07:22:18 GMT } Reply-To: scheer@stadt-mh.de (Dirch Scheer) } Organization: Stadt Muelheim an der Ruhr, Germany } } Hello INFORMIX-Gurus, } } I've posted this question twice, but got no response. So this is my last } try in hope to an answer. } } I've written a report called "r_red". Sometimes this report produces an } error (but it is not reproducable): } } Program error at "repvfg.4gl", line number 796. } SQL statement error number -242. } Could not open database table (scheer.t_r_red). } SYSTEM error number -113. } ISAM error: the file is locked. } } In line number 796 you can find a "START REPORT r_red". I have never } created a table "scheer.t_r_red", so I think its a temporary table made } by INFORMIX at runtime. But why should this temptable be locked by } another user??? Can anybody explain the mechanism when starting a } report??? } } In the rootdbs and in the filesystem pointed to by the DBTEMP variable } is enough space (~ 40 MB). So I don't think its a problem with diskspace. } } Any hints are welcome. Please help. } } Thanks in advance... } } Dirch Do you have an ORDER BY in your report? If so, try to eliminate it by moving the ORDER BY into the SELECT outside of the report, and either remove the ORDER BY from the report or replace it with ORDER EXTERNAL BY. With an ORDER BY in the report, the report becomes two-pass. First pass collects the data and outputs nothing. Second pass occurs when you FINISH REPORT. Then the sort takes place, followed by all output. Thus, the program needs a temp table to hold the data. If you try to rerun the report without exiting from the database, the temp table from the previous report is sort of there / sort of not there. This problem can also occur if you try to explicitly redefine a temp table within the same database session, so it's not just a report problem. It seems that deleted temp tables don't get completely cleared until you disconnect from the database. I am not sure if all versions have this problem. On the other hand, if there is no ORDER BY in your report, then I have no clue what is causing your error. Regards, Alan +---------------------------+-----------------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Lockheed Martin, SLS | Voice: 303-977-9998 | | P.O. Box 179, M/S 3810 | Standard disclaimers apply. Cutesy ones, too. | | Denver, CO 80201-0179 USA | Your mileage may vary. Void where prohibited. | +---------------------------+-----------------------------------------------+ -- | Fidonet: Alan Popiel 1:270/211.777@fidonet.org | Internet: 270-211-777!Alan.Popiel@mdtnbbs.com | Standard disclaimer: The views of this user are strictly his own. | From Mdtn_BBS 1 717 944-9653 [ In the Heart of Three Mile Island ]