Re: RDS 4.14/SE 5.06 Error dropping TEMP tables
Posted in 1996
Topics: General Discussion
The user name addition onto the table name is standard for all informix tables (not just temp tables). We had a similar problem as your when we were doing the following. The problem is that temp table even though you access them with a name (t1) informix accually is using a unique name defined internally for access. what we had to do was change our code so that we prepared our drop table statement and then executed it. let l_str = "drop table t1" prepare t1 from scratch execute t1 With the change being we force informix to re-prepare the drop statement each time we needed it. This eliminated our problem of table not found. You may want to try this approach. Good luck. Russ.... > > > Thank-you for your suggestion. However, it does not resolve my problem. > I have noticed the following difference which may be causing the problem: > > When the temp table is created using SELECT ... INTO TEMP tmp_table, the > database appears to see the table as tmp_table, but when you try to > delete rows or drop the table, it is looking for <user_name>.tmp_table > > For example, if I run the program as a user called 'accounts', the DROP > TABLE tmp_table command gives error: > Could not open database table (accounts.tmp_table) > > The SELECT ... INTO TEMP tmp_table gives error: > Table (tmp_table) already exists in database > > Note no username prefix on the latter message. > I am wondering if this is the cause of the problem and, if so, whether > there is a workaround. > This problem did not occur in RDS v4.10 or RDS v4.00 > > King Regards, > > Keith. > Russell P. Kahler |||||/// ---------- Internet: russell@oncontact.com ======== / Uh... on!contact Software . | O O | /Just reboot W67 N250A Evergreen Blvd | v_' / --> that will / Cedarburg, WI 53012 # _| |_ fix it / (414) 375-6555 (#) ( ) ---------- # //|* *| #//( * )/ # ===== # ( ) Blah, Blah, Blah. # || || .#---'| |----. #----' -----