IIS ASP - Re: ASP class help - For database & form with 120 fields

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > April 2006 > Re: ASP class help - For database & form with 120 fields





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: ASP class help - For database & form with 120 fields
Mike Brind

2006-04-27, 7:52 am


Dan wrote:
> (Using Classic ASP & MS Access)
>
> I have a page that has 120 fields on it (mostly checkboxes). I cannot
> split this into smaller pages.
>
> So what i want to do is write a class that handles this. in the code it
> would be something like:
>
> Set thisForm = new classBigForm
>
> thisForm.valname = Request.Form("name")
> thisForm.val1 = Request.Form("val1")
> thisForm.val2 = Request.Form("val2")
> thisForm.val3 = Request.Form("val3")
> thisForm.xyz = Request.Form("xyz")
> ....
>
> Writing the class wasn't too bad. But repeating the same code 120
> times, the file got pretty big. Is there a better way to do this
> dynamically?
>
> Also in the same respect to the amount of fields, is there an easy way
> to compare all of these values, so I can run an sql update only on the
> ones i need to?


You'll need to provide a bit more information on the form fields. Are
they all Yes/No options? Or are you providing users with a series of
related options, or groups of related options? How do they map to
database fields?

Also, what is the purpose of your class? Outputting the checkboxes in
html? Data Inserts, updates, deletes?

--
Mike Brind

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com