View Single Post
  #2 (permalink)  
Old Nov 10th, 2004, 22:13
da_stimulator da_stimulator is offline
Junior Member
Join Date: Oct 2004
Location: USA
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Loop through the RS and store the unique identifier into an array, then loop through the array deleting the records...

Example:
Code: Select all
Dim strArray(1)
i=0
if not(rs.eof) then
  do while not(rs.eof)
  strArray(i) = rs("bnID")

  i = i + 1

  ReDim Preserve rsArray(i)
  rs.movenext
  loop

  For i = 0 to Ubound(rsArray)
    strsql = "DELTE FROM BN WHERE bnID=" & rsArray(i)
    MM_bn_STRING.execute(strsql)
    response.write("Record " & rsArray(i) & " Deleted
" & vbcrlf)
   i=i+1
  Next
else
  response.write("No Results")
end if