Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Suggestion Needed....Please


Message #1 by "Some Guy" <registerukh@h...> on Thu, 10 Aug 2000 18:03:03 PDT
Hi folks,



I need some suggestions from you guys. I have an intranet project in hand.



Specs:



There is an application form which has fields ranging from 200-300 in 

number. Different number of fields are displayed depending on selection of 

different fields previously. After the end-user keys in the data and presses 

submit, the application should send an email containing the fields and their 

values to some concerned dept. Also, the keyed data should be saved in a 

database.

This intranet app will be used about 2-3 times a month and that too only by 

a single user.

End-of-specs.



Now I have spread the fields across several pages.

Now my question is:

Say, I have put 50 fields on the first page. When the user goes to the 

second page, I am not sure how to handle the data from the first page. 

Should I store them in the database immediately? or use some methods like 

session variables and write the data to database after all the pages have 

been filled in with data.



If I write the data to database right after first page is submitted, the 

problem could be like, if the user tries to go back to page 1 from page 2 by 

pressing back button on the browser (say to correct the data entered in the 

page 1) and then again pressing say submit button on the first page. The 

database will give duplicate record error.



Please suggest me as to what I gotta do.



Thanks in anticipation of your help.



David E





Message #2 by "Nick Middleweek" <nickm@t...> on Fri, 11 Aug 2000 12:48:22 +0000
David,



I'm sure there are a number of ways that yu can do this!



You could store the data from previous pages in hidden form elements and

'carry them' all the way unti the end where they finish and save the data

away there in one go and email it off too.



Another method would be to create the record before they get the first page.

You can then have a unique ID representing the record that needs to be

updated, each time they click submit the record is SELECTed and then the

relevant fields are updated. If though they change some data and then click

forward, this won't be updated in the db record so you could open a new

window before they get the first page and disable the visibility of the the

toolbar which will hide the back and forward buttons, which you can replace

with your own that are buttons that set the form action by code which go to

the right page so each time they click a back or forward button it saves the

data away.



The last one is a bit overboard - best off stating that they must click the

save button after making changes.





HTH

Regards

Nick Middleweek



----------

> Hi folks,

>

> I need some suggestions from you guys. I have an intranet project in hand.

>

> Specs:

>

> There is an application form which has fields ranging from 200-300 in

> number. Different number of fields are displayed depending on selection of

> different fields previously. After the end-user keys in the data and presses

> submit, the application should send an email containing the fields and their

> values to some concerned dept. Also, the keyed data should be saved in a

> database.

> This intranet app will be used about 2-3 times a month and that too only by

> a single user.

> End-of-specs.

>

> Now I have spread the fields across several pages.

> Now my question is:

> Say, I have put 50 fields on the first page. When the user goes to the

> second page, I am not sure how to handle the data from the first page.

> Should I store them in the database immediately? or use some methods like

> session variables and write the data to database after all the pages have

> been filled in with data.

>

> If I write the data to database right after first page is submitted, the

> problem could be like, if the user tries to go back to page 1 from page 2 by

> pressing back button on the browser (say to correct the data entered in the

> page 1) and then again pressing say submit button on the first page. The

> database will give duplicate record error.

Message #3 by "Some Guy" <registerukh@h...> on Sat, 12 Aug 2000 19:15:58 PDT
Thanks Nick for your suggestion. It helped me a lot. - David



>From: "Nick Middleweek" 

>Reply-To: "ASP Databases" <asp_databases@p...>

>To: "ASP Databases" <asp_databases@p...>

>Subject: [asp_databases] Re: Suggestion Needed....Please

>Date: Fri, 11 Aug 2000 12:48:22 +0000

>

>David,

>

>I'm sure there are a number of ways that yu can do this!

>

>You could store the data from previous pages in hidden form elements and

>'carry them' all the way unti the end where they finish and save the data

>away there in one go and email it off too.

>

>Another method would be to create the record before they get the first 

>page.

>You can then have a unique ID representing the record that needs to be

>updated, each time they click submit the record is SELECTed and then the

>relevant fields are updated. If though they change some data and then click

>forward, this won't be updated in the db record so you could open a new

>window before they get the first page and disable the visibility of the the

>toolbar which will hide the back and forward buttons, which you can replace

>with your own that are buttons that set the form action by code which go to

>the right page so each time they click a back or forward button it saves 

>the

>data away.

>

>The last one is a bit overboard - best off stating that they must click the

>save button after making changes.

>

>

>HTH

>Regards

>Nick Middleweek

>

>----------

> > Hi folks,

> >

> > I need some suggestions from you guys. I have an intranet project in 

>hand.

> >

> > Specs:

> >

> > There is an application form which has fields ranging from 200-300 in

> > number. Different number of fields are displayed depending on selection 

>of

> > different fields previously. After the end-user keys in the data and 

>presses

> > submit, the application should send an email containing the fields and 

>their

> > values to some concerned dept. Also, the keyed data should be saved in a

> > database.

> > This intranet app will be used about 2-3 times a month and that too only 

>by

> > a single user.

> > End-of-specs.

> >

> > Now I have spread the fields across several pages.

> > Now my question is:

> > Say, I have put 50 fields on the first page. When the user goes to the

> > second page, I am not sure how to handle the data from the first page.

> > Should I store them in the database immediately? or use some methods 

>like

> > session variables and write the data to database after all the pages 

>have

> > been filled in with data.

> >

> > If I write the data to database right after first page is submitted, the

> > problem could be like, if the user tries to go back to page 1 from page 

>2 by

> > pressing back button on the browser (say to correct the data entered in 

>the

> > page 1) and then again pressing say submit button on the first page. The

> > database will give duplicate record error.

>


  Return to Index