Dynamic Field Name??

Results 1 to 2 of 2

Thread: Dynamic Field Name??

  1. #1
    Join Date
    Dec 1969

    Default Dynamic Field Name??

    hi i need to get the name of a redordset from a querystring<BR>for example <BR>move = request.querystring("move")<BR>.....<BR>ObjRs(wave ) = "whatever"<BR>it&#039s the name of the field i need to retrieve from the querystring

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamic Field Name??

    Your message was somewhat garbled.<BR><BR>But I *think* what you are saying is that you want to pass both a field name and a value for that field into an ASP page and then change the value of the named field in a given record in the database. Yes?<BR><BR>So something like this:<BR><BR>&#060;%<BR>fieldName = Request("dbFieldName")<BR>fieldValue = Request("dbNewValue")<BR>recordID = Request("userIDtoUpdate")<BR><BR>SQL = "UPDATE someTable SET " & fieldName & "=&#039" & fieldValue & "&#039 WHERE UserID=&#039" & recordId & "&#039"<BR><BR>someConnection.Execute SQL<BR><BR>%&#062;<BR><BR>??? is that along the lines of what you are trying to do? But *PLEASE* don&#039t use QueryString if at all possible! Please change and use Request.Form if you can.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts