[thelist] [ASP] Need some help saving a record SOLVED

Michael Galvin mpgalvin at eircom.net
Mon Nov 6 17:40:33 CST 2000


Yeah, I made a bit of an FU on the first try.  It worked fine for one
certain filter, but screwed up at all other times.

So, I got this instead:

set filter
dim fieldname
loop while not EOF
    fieldname = "skilldesc" & adoRS("skillcode")
    adors("description") = Request.QueryString(fieldname)
    Update
    MoveNext
end loop

Works like a charm (again), but this time all I'm doing it re-creating the
unique fieldname ("skilldesc"+code) and then using that to fill the
description.  If the code of the current record in the RS doesn't match the
code used to name the field in the form, nothing happens.

I tell ya, if the A-team had had me on their team, well, they'd have still
been held in a hut with all the parts required to make a tank, but their ASP
files would have worked really well too!

m.

----- Original Message -----
From: Warden, Matt <mwarden at odyssey-design.com>
To: <thelist at lists.evolt.org>
Sent: Monday, November 06, 2000 9:48 PM
Subject: Re: [thelist] [ASP] Need some help saving a record SOLVED


| > set filter on database to category code
| > dim fieldname, n
| > n = 1
| > loop
| >     fieldname = "skilldesc" & cstr(n)
| >     recordset.description = Request.QueryString(fieldname)
| >     n=n+1
| >     adors.Update
| >     adors.MoveNext
| > end loop
|
| are you not assuming that there are records starting at 1 and going on
from
| there hitting each integer? And I don't see how the loop ever stops... how
| would you know when to stop the loop?
|
| > (It does of course make the assumption that the order of the fields on
the
| > posting form are the same as the order of the records in the db.  Is
this a
| > horrible assumption to make?)
|
| Maybe, maybe not. Just don't delete any records ;-)
|
|
|
| --
| mattwarden
| mattwarden.com
|
|
| ---------------------------------------
| For unsubscribe and other options, including
| the Tip Harvester and archive of TheList go to:
| http://lists.evolt.org Workers of the Web, evolt !
|





More information about the thelist mailing list