Deleting Records

Results 1 to 2 of 2

Thread: Deleting Records

  1. #1
    Join Date
    Dec 1969

    Default Deleting Records

    hey<BR><BR>i want to be able to delete more than one record at once.<BR><BR>Currently i have a page called admin.asp where i can look at all the people who signed up.<BR>at the end of each row i have a link to delete that user and it works fine.<BR><BR><BR>NOW i want to be able to delete members in bulk, more than 1 at a time so its faster for me.<BR><BR>Like in yahoo and hotmail how you click a checkbox to delete that message so u can delete more than one message.<BR><BR>If u know what i mean can u please help<BR>thanks :)

  2. #2
    Join Date
    Dec 1969

    Default RE: Deleting Records

    just get all the key values for each row you&#039;d like to delete and modify your sql to delete more than 1 row..<BR><BR>sSQL = "DELETE * FROM TableName WHERE KeyColumn = &#039;" & s1 & "&#039; OR KeyColumn = &#039;" & s2 & "&#039; OR KeyColumn = &#039;" & s3 & "&#039;"<BR><BR>should work fine.<BR><BR>alternatively, you can loop through the fields and execute sql statements one at a time until you have nothing left to delete..<BR><BR>for i = 0 to iMax<BR>sSQL = "DELETE * FROM TableName WHERE KeyColumn = &#039;" & sDelArr(i) & "&#039;"<BR>ra = ExecuteSQL(sSQL) <BR>&#039; this is a generic funciton is use to execute SQL, <BR>&#039; your function may not look the same<BR>next<BR><BR>justin

Posting Permissions

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