|
| 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?
|
|