Are you using traditional ASP or ASP.NET? My suggestion would be:
1.) Create two tables with matching fields (with all the required fields). On one table use the Session ID as the key - temp table, and on the other table use a unique ID (an Identity field or GUID) - permanent table. Note: create a timestamp field on the temporary table that you set when the record is started. 2.) As the user is filling in the form, save the data to the temp as they complete each form. 3.) Once the user has completed the form, do a SELECT INTO (using a stored procedure so you can wrap everything in a transaction!!) into the permanent table. The value of using this approach is that: you don't need to store anything on the user's computer (cookie), you don't need to deal with hidden fields, and finally, you have some type of assurance that the permanent record is a valid (complete) one; you don't need to worry about flags - simply delete records in the temporary table on a regular basis (that's what the timestamp field is for). Also, @@IDENTITY works just fine most of the time - if you are concerned use @@IDENT_CURRENT instead (see SQL Server Books on Line). Finally, there is a Session_End function (in Global.asa or Global.asax) that is called when the session ends; you can delete the temporary record there. Although, in my experience, it doesn't work all the time. The reason I asked if you use ASP.NET is because, if you are then you can use Cookie-less sessions (the SessionID will be on the URL line). Robert M. Teague Kaneohe, HI ----- Original Message ----- From: "wwwpages" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 10, 2003 2:17 PM Subject: [wdvltalk] Multi Page ASP Forms > Hi guys, > > I am after some advice on the best way to handle multi page ASP forms. I > have searched around a little and their seems to be three alternatives - > hidden fields, cookies or session variables. What are the benefits or > disadvantages of each method in your opinion? My form will be probably 5 or > so pages long, with around 20 fields per page. > > Thanks in advance > > Heath > > > > ____ . The WDVL Discussion List from WDVL.COM . ____ > To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] > Send Your Posts To: [EMAIL PROTECTED] > To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. > To change subscription settings to the wdvltalk digest version: > http://wdvl.internet.com/WDVL/Forum/#sub > > ________________ http://www.wdvl.com _______________________ > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
