RE: Temp Tables
Posted in 1998
Jonathan Leffler wrote:
>
> Iftikhar Khan (iftikhar_khan@mailcity.com) wrote:
> >My source code for Informix 4gl creates some temp tables after making
> some
> >query. Now at anytime, I cannot know what table it created with what
> fields.
>
> That's true in general. Short of poking around in the SysMaster =
database,
> you cannot find out what temporary tables have been created by your
> process, much less what the columns of those tables are.
>
There is a program of mine in the IIUG Archives called temptab (4GL), =
which allows you to see the names and sizes (in pages and rows) of all =
temporary tables or specific to a user, database etc. But you still =
can't see the schema or the content, as Jonathan said.
> >But when I debug it then, at some moment, I will know what table it is
> >creating.
>
> True.
>
> >Now my question is: Can I see these table and their data using =
dbaccess>
> Absolutely not. They are private to the I4GL program; they wouldn't be =
any
> use if they were visible outside your I4GL program because then you'd =
have
> to worry about whether anybody else is also running a program which =
creates
> a temp table with the same name.
>
> > or there is some other way to see this table?
Three options:
- add code to unload the temp tables at appropriate points in the =
program.
- break the SQL out of the 4GL and run it in a dbaccess session.
- create the temp tables as permanent or real tables whilst performing =
the
step-through and debugging of the SQL. This is usually a last resort,
as you have to hack a lot of code to make it work.
>
> I don't think there's any way to see the contents of the table except =
via
> the I4GL code which creates it.
>
> Yours,
> Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h>
>
>
Hope that helps
RET
+------------------------------------------+
| Richard Thomas |
| DBA - Marketing Information Systems |
| Optus IT |
| email: richard_thomas@yes.optus.com.au |
| Ph: +61 2 9342 7188 |
| "My opinions are my opinions" |
+------------------------------------------+