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
Dan

2006-04-27, 7:52 am

Thanks for all the advice. I think i want to go somewhere where bob
was mentioning, but im still not exactly sure.

As for the field names they are not all 'val1', 'val2'.. I believe all
of them are 3 letters long and all letters.

Here is a little more info on the class, and how i want to use it.

'1. grab the data and put it into a class
set existForm as new BigForm
existForm.formID = Request.Form("formID")
existForm.PopulateFromDB
' this would select * from...


'2.
set newForm as new BigForm
' copy all the values from existForm to newForm.


'3. I would have an array that lists all the fields.
' this part in not sure what the proper syntax would be. this would be
a function in the class called, populateFromHTTP

For i = 0 to ubound(aryTableTwo)
newForm.i = Request.Form(i)
Next


'4. Finally we update the database, again using the array for the
field names.

For i = 0 to ubound(aryTableTwo)
If existForm.i != newForm.i Then
' There has been a change.
'strSQL = strSQL & "UPDATE tableTwo Set " & i & " = newform.i &
" WHERE formID = " & newform.formid & ";"
End IF
Next

I think this method should work for the majority or the items. A few
things will need some special handling but i can work that out. Does
anybody know what the proper syntax for the above idea would be?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com