Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Must prepare requests that return result in temporary tables

Status
Not open for further replies.

la46

Programmer
Mar 15, 2004
26
MA
Hi,
I 've a code that work in a machine (UnixWare, informix 7.), but when i use the same code in a second machine with the same caracteristics, all requests that return result in temporary tables must be prepared otherwise they don't work.
Any Idea?
Thanks to ALL.
 
I have no idea what you asking. you'll have to provide more information. How about some code?
 
Ok,
In the first machine(A) i've requests like:
select * from table into temp tmp_table
select count(*) into counter from tmp_table
-->counter is 10 for example.

When i use this same code in the seconde machine(B)
-->counter is 0

I 've to change my code like:
req="select * from table into temp tmp_table"
prepare req_ex from req
execute req_ex
select count(*) into counter from tmp_table
-->counter is 10.

Any Idea about the reason?
Thanks!
 
Interesting problem. You've definitely found a bug in the 4GL. That's a nice work around.

In my past experience with Informix 4GL, I've seen a problem where if you were reusing a TEMP table that the 4GL would act just the way you've described.

For example, if you've used tmp_table and dropped it and then, again, used it as in 'select * from table into temp tmp_table', the table wouldn't populate. It's like the drop command is ignored.

What happens if you create the temp table separately and the do something like this:

insert into tmp_table
select * from table

Regards,


Ed
 
when using the request in a single module it works, but in the global module it does'nt.(the tow formule work in a simple test code)
thanks FOR ALL Ed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top