dropping temp table test
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi,Informix gurus,
I was told that "dropping temp table explicitly in 4gl doesn't always work". So I have done some testing on the following
4gl/engine environments and SEEMS that statement is NOT true. Can anyone
please tell me why or on what circumstances the statement is true?
1) INFORMIX-4GL Version 7.20.UD7 , INFORMIX-SE Version 7.23.UC1
2) INFORMIX-4GL Version 6.05.UD1 , INFORMIX-SE Version 7.23.UC1
x.4gl
database mytest
main
define l_line char(20)
create temp table t1(c1 integer,c2 char(20)) with no log
insert into t1(c1,c2) values (1,"line1")
select c2 into l_line from t1 where c1 = 1
display l_line
display "Temp table is about to be dropped ..."
drop table t1
display "Should have been dropped,let's see if it is still there...by
creating the same temp table again"
create temp table t1(c1 integer,c2 char(20)) with no log
insert into t1(c1,c2) values (3,"line3")
select c2 into l_line from t1 where c1 = 3
display l_line
drop table t1
display "OK!"
end main
FYI
Peter Ai
peter@quanta.co.nz
302 3760
Quanta Systems Limited