how would i so this.........

Results 1 to 2 of 2

Thread: how would i so this.........

  1. #1
    Join Date
    Dec 1969

    Default how would i so this.........

    Hello I have a form and in side the form is a loop to build a list of messages one has in the database and a check box beside each item in the list the form is used to delete them. I named the check boxes del_1 the number changes for each item. how would i then delete the ones that are checked?<BR><BR>If you have any ideas are posiable answers for me<BR>or if you know of any other way for me to do this please reply

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, Queries

    The link to the ASPFAQs is at the top right corner of most every page on this site, including this one.<BR><BR><BR><BR>And the "trick" is to *NOT* give each checkbox a different name.<BR>In this case, the easiest way would be to give them all the checkboxes the SAME NAME. And just put the primary key value of each record as the VALUE="..." of each field.<BR><BR>That is:<BR><BR>&#060;% Do Until RS.EOF %&#062;<BR>...<BR>&#060;INPUT Type=CheckBox Name="Delete" Value="&#060;% = RS("fieldThatIdentifiesRecord") %&#062;" &#062;<BR><BR>&#060;%<BR>Rs.MoveNext<BR>Loop<BR>%& #062;<BR><BR>And then follow the guidelines of that FAQ, doing a SQL DELETE instead of a SQL SELECT, else it&#039;s basically the same.<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