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

Michael Galvin mpgalvin at eircom.net
Mon Nov 6 05:00:39 CST 2000


Thanks

But in the meantime, I came up with my own little solution, which I thought
I would share with the group :)

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

It sure ain't purty, but it works like a charm.  I could probably make a tip
out of it, but I doubt it's very revolutionary...

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

Michael

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


| Well, I don't know if I have the best solution for this, but I basically
did
| what you started to do, but I had another hidden field named (tailored for
| your case): skilldescfieldnames, which held a comma-delimited list of the
| field names on the page. So, in your loop, you'd do something like:
|
| <%
| loop
| ...
| sDescFieldName = "skilldesc" & rs("skillcode")
|
| if not sAllDescFieldNames="" then
sAllDescFieldNames=sAllDescFieldNames&","
| sAllDescFieldNames=sAllDescFieldNames & sDescFieldName
| ...
| end loop
| %>
| <input type="hidden" name="skilldescfieldnames" value="<%Response.Write
| sAllDescFieldNames%>">
|
| Make sense? Like I said, this is how I've handled it before. Might not be
the
| best way.
|
| --
| mattwarden
| mattwarden.com
|
| > Yep.  I'm showing all the skill descriptions for the chosen category,
and
| > allowing them to update whichever ones they want.  I then want to save
all
| > the changes.
|
|
|
| ---------------------------------------
| 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