A temporary database | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

A temporary database

Hi ! I use Sql 2000 Server as a database and an ASP.NET application with VB.NET language. Now I am working with three pages with one form in every page that allows to register a user. To accomplish the registration the user needs to fill all the three pages, but now I am sending the data to the database in every page, so if a user leaves the process before reaching the third page it will have an invalid user entry into the database that I don#%92 t want. To avoid this I was recommended to store the in a temporary database file. I have been searching information about this but I have not found it. Somebody can help me finding the necessary documentation to achieve it please?
Or you could pass the parameters between the pages and do your inserts at the last page.
bambola is right. Doing an insert in the lastpage is the best option.
Minimizing trips to the database will make the pages load faster. However, if you do have to do the inserts between pages, you should probably use a temporary table, not a temporary database. Say, the three pages do their inserts in table1, table2 and table3 tables. Create tmp_table1, tmp_table2, tmp_table3 and leave them in your database.
Between page1, page2 and page3 do your inserts into the tmp tables. Once on the last page, move the record(s) from tmp tables to the real table1, table2 and table3. You may want to delete the record(s) form tmp tables once copied to the real tables, but do not drop the tmp tables. You can reuse the same tmp tables for all the users.
Ok, thank you very much !