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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with Temporary Tables

Status
Not open for further replies.

SmokeyJoe

Programmer
Nov 13, 2000
80
US
I am working on a project where the user enters data in the same HTM page from 1 to "N" times. This data needs to be stored in temp tables so it can be processed as a transaction when all of the data has been entered. The permanent tables are in a DB named "Test". I create the temp tables after the first page is processed and can enter the data from the first page whith no problem. When I try to enter the second page I get the message "table 'test.tablename' doesn't exist'.

In other words it is looking for the temp table in the database on the server.

How can I correct htis.

Thanks in advance.
Smokey Joe
 
I've never heard of the concept of temporary tables, I suggest looking into ROLLBACK/COMMIT statements.
 
apatterno:
Unless he's using InnoDB or BDB tables, ROLLBACK/COMMIT aren't supported.

SmokeyJoe:
I assume that you are using the keyword "TEMPORARY" in your CREATE TABLE statement.

If you have, then the table is automatically deleted when your current connection to the database ends ( , search for the word "TEMPORARY"). The connection to the database is automatically closed at the end of execution of your script.

I recommend that you either create permanent tables that you drop when you are done with them, or use persistent connections to the database server. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top