Recordset delete question/problem
My question is this...
In the code below my first sql statement updates a table.
my second then grabs all data from that table and chooses the ones that are "deactivated"
I am then inserting those "deactivated" records into a new table.
I want to delete the deactivated data from the first table. can I use the same recordset that I used for the previous insert or do I have to create a new recordset?
here is the code.....SQL Server by the way...
deaID = request("deaID")
sql = "update dealerships set dactive=0 where deaID=" & deaID
set deldealer = conn.execute(sql)
sql2 = "SELECT * FROM dealerships WHERE dactive=0"
set rs = conn.execute(sql2)
DO While not rs.eof
sql3 = "INSERT INTO inactivedealerships (Blah, blah, blah) VALUES ("BLAH, BLAH, BLAH")"
set rs2 = conn.execute(sql3)