Subject Re: [firebird-support] Temp tables between apps
Author unordained
---------- Original Message -----------
From: Venus Software Operations <venussoftop@...>
> I had tried to use Temp Tables in my app, that was fine. Now these
> temp records needed to be access in a different app, Report Manager,
> for reporting purposes and this was not possible because RM was not
> able to see the temp records created in my app.
>
> Is there any solution except a regular table in which the records then
> are added and deleted as required.
------- End of Original Message -------

Short answer: no.

Long answer: temporary table contents are bound either to the transaction or the
connection; so at a minimum, to keep the contents from disappearing, the two apps
would need to share and/or hand-off the connection (e.g. tcp/ip socket, but
Firebird can use several connection methods) itself. If the two apps were, say,
Apache Modules or Web Applications living in the same container, it might be
possible to hand off the connections between threads; on the same machine, it
might be possible (via forking, shared memory, etc.) for two processes to hand
off the connection. You could probably also create a proxy process that opens
connections and keeps them open, accepting new connections from various apps on
the network and shunting them into existing DB connections, allowing them to hand-
off without the proxy closing its handle to the database, keeping temporary data
alive. I've not seen it done, and it's extremely unlikely not to be an entirely
overblown solution for your needs. Use persistent tables.

-Philip