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