Re: 4GL error -710 for Temp Tables
Posted in 1993
The main thing to watch is that any statements prepared against a table such as a temporary table T version 1 will not be usable against a new incarnation of the same temporary table T version 2. The error might well be reported because the underlying table had changed, because it was dropped. Given the engine you are using, you will probably find DELETE FROM T reliable and using it may avert the problem -- though the logic would need to be changed from using SELECT FROM INTO TEMP to using INSERT INTO SELECT FROM. Alternatively, don't prepare statement against the temporary table, despite the performance advantages this normally gives. Or, remember to re-prepare the statements after dropping the temporary table. Historically, thrashing temporary tables by dropping them and rebuilding them repeatedly or deleting all rows out of them has not always been very reliable. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: duhon@netcom.com (Joey Duhon) }Subject: 4GL error -710 for Temp Tables }Date: Tue, 14 Sep 1993 17:12:25 GMT }X-Informix-List-Id: <news.4328> }I'm running RDS 4GL 4.10 under Online 5.0 on a SCO UNIX 486 box. }I've some new code that uses a temp table over and over, and }I'm getting -710 errors randomly, but quite often. }I'm totally puzzled by the error description, because it in no }way describes what is going on in the SQL statement in question. }========== }-710 Table table-name has been dropped, altered, or renamed. }After a statement has been prepared in the database server and before the }user executes it, the table has been renamed or altered, possibly changing the }structure of the table. Problems may occur as a result. }========== }The code does not alter or rename at any point. }The table is dropped after being used, but is recreated before being }used again. I create it from a 'select into temp' and with }'create temp table.' The error occurs in both cases. }In fact it also occurs on the 'create temp table' statement itself }sometimes. }The program is enourmous, but in essence it repeatedly: } creates the temp table (as described above) } does one or more of the following: delete from, insert into, update } selects from } drop temp }There is only one database in use by the program. }The program uses a few other temp tables, and never has an error with them.