Detecting the existence of a temporary table
Posted in 2000
Topics: General Discussion
Hello everybody
I'm running an application which uses temporary tables. We're using an
IIS to access the database, so there are times that the same connection
is used to access the data, and sometimes the temporary tables are
already created. In this case, we have to drop them otherwise the
application fails.
I was using the following command:
select tabname from sysmaster:systabnames where tabname = "mytemptable"But with this command, I can't determine which connection is using the
temporary table.
My question is: is there a way of bind the temporary table with my
current connection ? I must test this before running the drop command,
because if the table was not created by my current connection, then the
drop command gets an error and the application fails.
Hope somebody can help....
Best regards
--
Paulo Roberto Marelli de Amorim
TS&0 Consulting
Brasil
Sent via Deja.com http://www.deja.com/
Before you buy.
Your application does not have to "fail" - you could configure it to
CONTINUE. Examine the WHENEVER command in your Syntax manual.
Rudy
Paulo Amorim wrote:
> Hello everybody
> I´m running an application which uses temporary tables. We´re using an
> IIS to access the database, so there are times that the same connection
> is used to access the data, and sometimes the temporary tables are
> already created. In this case, we have to drop them otherwise the
> application fails.
> I was using the following command:
> select tabname from sysmaster:systabnames where tabname = "mytemptable"> But with this command, I can´t determine which connection is using the
> temporary table.
> My question is: is there a way of bind the temporary table with my
> current connection ? I must test this before running the drop command,
> because if the table was not created by my current connection, then the
> drop command gets an error and the application fails.
> Hope somebody can help....
> Best regards
> --
> Paulo Roberto Marelli de Amorim
> TS&0 Consulting
> Brasil
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Paulo Amorim wrote:
> Hello everybody
> I´m running an application which uses temporary tables. We´re using an
> IIS to access the database, so there are times that the same connection
> is used to access the data, and sometimes the temporary tables are
> already created. In this case, we have to drop them otherwise the
> application fails.
> I was using the following command:
> select tabname from sysmaster:systabnames where tabname = "mytemptable"> But with this command, I can´t determine which connection is using the
> temporary table.
> My question is: is there a way of bind the temporary table with my
> current connection ? I must test this before running the drop command,
> because if the table was not created by my current connection, then the
> drop command gets an error and the application fails.
> Hope somebody can help....
> Best regards
> --
> Paulo Roberto Marelli de Amorim
> TS&0 Consulting
> Brasil
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Every time a processes which has created temp tables is terminated then all
related temp tables to that connection are dropped automatically, so an
easy solution is to terminate the application before using the IIS.
--
Compliments of QueriX
--------------------------------------------------------------------------------------------------
QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other
RDBMS such as Oracle.
Hydra 4GL Compiler (Compatible with I4GL) Compile once, run everywhere
Phoenix Windows GUI. (Front End to 4GL)
Chimera Java GUI The only GUI you will ever need... (Front End to 4GL)
Arachne Web Technology (Front End to 4GL on the Web & HTML Report
Generator)
ESQL/C Compiler
For more details visit: http://www.querix.com/
---------------------------------------------------------------------------------------------------