If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > temp tables in PHP -> Informix (odbc)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-09, 07:04
lexacccp lexacccp is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
Question temp tables in PHP -> Informix (odbc)

I have a problem with SELECT from temp table in informix (from PHP script, connect by ODBC). Stored function creates temp table (tmp_table) and after that i try select from temp table, but there is an error: [Informix][Informix ODBC Driver][Informix]The specified table (tmp_table) is not in the database.

Execution of function and SELECT both are in the same session.

If i do it by Aqua Studio, it's all OK.

Can somebody help me with this problem?
Reply With Quote
  #2 (permalink)  
Old 08-13-09, 03:07
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
Temporary tables reside on a single process id / session id. What's probably happening is that you're either using some kind of connection pooling or disconnecting and reconnecting the connection when trying to select from that temporary table (and because your session id has changed, the table no longer exists for you). Probably the simplest solution is not to use a temporary table (use a permanent one), because it could take a while to figure out what's going on!
Reply With Quote
  #3 (permalink)  
Old 08-13-09, 09:07
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
Quote:
Originally Posted by bigcalm
Temporary tables reside on a single process id / session id. What's probably happening is that you're either using some kind of connection pooling or disconnecting and reconnecting the connection when trying to select from that temporary table (and because your session id has changed, the table no longer exists for you). Probably the simplest solution is not to use a temporary table (use a permanent one), because it could take a while to figure out what's going on!
or just solve the problem with the connection...

I don't recommend create a permanent table, because this can overhead your database, generating consequences for your backup and database performance.

In the worst situation, if at the moment there is no other way to solve the connection problem, create the permanent table as RAW table , this way you not will log this tables unnecessarily ...
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #4 (permalink)  
Old 09-11-09, 06:22
lexacccp lexacccp is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
Question

bigcalm, ceinma, thank you for your answers.

Unfortunately, i haven't got permission to modify stored procedure and create new tables in database...

May be some other way exists?
Reply With Quote
  #5 (permalink)  
Old 11-19-09, 11:36
DavidDavis DavidDavis is offline
Registered User
 
Join Date: Nov 2009
Location: Amarillo Texas
Posts: 1
Hi lexacccp,

Did you find a solution? I'm having the same issue. I upgraded to Informix Client SDK 3.50.TC4DE and got the same message.

Thanks

David
Reply With Quote
  #6 (permalink)  
Old 11-20-09, 03:10
ovlqar ovlqar is offline
Registered User
 
Join Date: Nov 2009
Posts: 1
I accept with information: In the worst situation, if at the moment there is no other way to solve the connection problem, create the permanent table as RAW table , this way you not will log this tables unnecessarily .
Reply With Quote
  #7 (permalink)  
Old 11-20-09, 16:35
lexacccp lexacccp is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
DavidDavis, hi!

The problem was in option "Cursor Behavior" (Configure -> Environment).
Change it from "0-Close" to "1-Preserve".
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On