PC Review


Reply
Thread Tools Rate Thread

Delete Recordset

 
 
Greg Franke
Guest
Posts: n/a
 
      26th May 2004
Is there a way to delete an ADO recordset once it has been created?

Thanks,
Greg


 
Reply With Quote
 
 
 
 
Chris Nebinger
Guest
Posts: n/a
 
      26th May 2004
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

>-----Original Message-----
>Is there a way to delete an ADO recordset once it has

been created?
>
>Thanks,
>Greg
>
>
>.
>

 
Reply With Quote
 
Greg Franke
Guest
Posts: n/a
 
      26th May 2004
Thanks man, your advice worked!

I wanted to destroy the recordset and recreate it.

Thanks again!
Greg


"Chris Nebinger" <(E-Mail Removed)> wrote in message
news:12bd001c4433a$8edb7e10$(E-Mail Removed)...
> 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
>
> >-----Original Message-----
> >Is there a way to delete an ADO recordset once it has

> been created?
> >
> >Thanks,
> >Greg
> >
> >
> >.
> >



 
Reply With Quote
 
Chris Nebinger
Guest
Posts: n/a
 
      26th May 2004
You could just reset the variable:

ADO:

Set rst = New ADODB.Recordset

DAO:

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

Chris Nebinger


>-----Original Message-----
>Thanks man, your advice worked!
>
>I wanted to destroy the recordset and recreate it.
>
>Thanks again!
>Greg
>
>
>"Chris Nebinger" <(E-Mail Removed)>

wrote in message
>news:12bd001c4433a$8edb7e10$(E-Mail Removed)...
>> 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
>>
>> >-----Original Message-----
>> >Is there a way to delete an ADO recordset once it has

>> been created?
>> >
>> >Thanks,
>> >Greg
>> >
>> >
>> >.
>> >

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DAO Recordset Record Won't Delete Brandon Johnson Microsoft Access Forms 3 31st May 2006 12:08 PM
Delete ADODB Recordset =?Utf-8?B?SmltIFRob21saW5zb24=?= Microsoft Excel Programming 3 12th Jan 2005 04:16 AM
How to loop through a recordset and update the field of a recordset or delete current record Karen Middleton Microsoft Access Macros 1 4th Jan 2005 10:30 AM
How to loop through a recordset and update the field of a recordset or delete current record Karen Middleton Microsoft Access Queries 1 4th Jan 2005 10:30 AM
Refrech after delete recordset =?Utf-8?B?UGFudGVsaXM=?= Microsoft Access Form Coding 1 8th Sep 2004 01:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 AM.