Deleting selected records using ASP

Results 1 to 3 of 3

Thread: Deleting selected records using ASP

  1. #1
    J.Thompson Guest

    Default Deleting selected records using ASP

    Hello All! This might be simple for some but I've never done this before so I would love some suggestions from any one of you. I'm trying to do a simple delete checked records using ASP and an odbc datasource. You know, when you go to a site and you see check boxes next to each entry and a button at the bottom that says "Delete all checked entries". Simply put, I'd like to find out how to code that delete all checked entries feature into my asp scripts. Right now I'm just deleting each individually where ID = (blah). But I'd like to delete more than one at a time. Any help would be greatly appreciated. Thanks!

  2. #2
    Join Date
    Dec 1969

    Default Not advanced...

    ...but I&#039;ll answer anyway.<BR><BR> sVal = "10,104,1034,4,16,97"<BR> sSQL = delete from tableA where mykey in(" & sVal & ")"<BR><BR> If you have a comma delimited string of values<BR> from your checkboxes, you are all set.

  3. #3
    Join Date
    Dec 1969

    Default And crossposted...

    I answered in the Database Q&A.<BR><BR>DAMMIT!! I keep forgetting about that IN clause...

Posting Permissions

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