Updating records

Results 1 to 2 of 2

Thread: Updating records

  1. #1
    Join Date
    Dec 1969

    Default Updating records

    I have a page that presents ADO records in a list, like this...<BR><BR>Order# Date Shipped<BR>10000 12/20/2002<BR>10001 12/20/2002<BR>10002 12/21/2002<BR><BR>... where "Shipped" is a checkbox, one for each record, (doesn&#039;t look right in this format). To the far right of the page there is a graphical Save button for each record. If a user checks the checkbox and clicks the associated Save button, I want to save the checked state back to the database for that record and refresh the page. I&#039;ve coded the button to call a routine to do the save, and am passing the ID of the record (oRecordSet("ID")) and the Shipped field value (oRecordSet("Shipped")) in a querystring, like this <BR><BR>&#060;a href="SaveOrder.asp?i=&#060;%=oRecordSet("ID")%&#0 62;&s=&#060;%=oRecordSet("Shipped")%&#062;"&#062;& #060;img src="images/SaveButton.gif" ... &#062;&#060;/a&#062;<BR><BR>Problem is, it seems, that checking the box does not change the value in the recordset so the routine does not receive a new value. I&#039;m obviously missing something here. So, how do I do this so that SaveOrder.asp receives the new state (value) of the checkbox for that record?<BR><BR>Thank you in advance.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Updating records

    Well, if you wanted to save several checkbox values at once, then you might follow this procedure:<BR>http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=141<BR><BR>I certainly don&#039;t see how you can use a hard-code HREF as you are trying to do. It makes no sense. That won&#039;t send the value of the checkbox on to your SaveOrder.asp page. Only submitting a form or a bit of somewhat fancy JavaScript coding would do that.<BR><BR>If you really want to do this where you save each checkbox state with a separate save button/image, then I guess you could use a separate &#060;FORM&#062;....&#060;/FORM&#062; for each line. That would likely be the easiest thing.<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