Delete Recordset

  • Thread starter Thread starter Greg Franke
  • Start date Start date
What do you mean by delete? Delete all the records in the
recordset from the original table? If so, then the answer
is it depends on the method used to open it. Snapshots,
Forward-only, and read only's the answer would be no. For
Keysets:

rst.movefirst
do until rst.eof
rst.delete
rst.movenext
loop


If you just want to destroy the variable:

Set rst = nothing

That clears out the recordset from memory, but the
underlying records are intact.


Chris Nebinger
 
Thanks man, your advice worked!

I wanted to destroy the recordset and recreate it.

Thanks again!
Greg
 
You could just reset the variable:

ADO:

Set rst = New ADODB.Recordset

DAO:

Set rst = dbs.OpenRecordset("SQL HERE")

Chris Nebinger
 
Back
Top