DAO recordset gymnastics

DanR

Registered User.
Local time
Tomorrow, 00:57
Joined
Mar 14, 2002
Messages
54
Hello all

A couple of questions about DAO recordsets on which I'd love your help..

Firstly, how can I create a recordset which is based on the contents of a table but is not 'bound' to the table. I want to be able to delete records from the recordset without affecting the source table. Although I used an SQL query to define the contents of a recordset (in openrecordset) it remains tied to the source table and tries to delete records from the source table when I delete records from the recordset. How can I 'unbind' it from the source table so that deleting a record from the recordset does not affect the source table. I have tried creating a copy of the source table, so that deleting records is no problem, but I still get errors for deleting records which are related to data in another table.

Secondly, it is possible to turn the recordset into a new table (short of creating a new table and copying in all of the fields / records one by one)?

thanks

Dan
 
How about using a make table query to create the copy. This would then create a stand alone table from which you can delete the records or amend them etc.
 
With DAO you will need to create a temp table and copy the data into it (this will prevent issues with linking)

With ADO you can open the recordset and then disconnect it. Thus allowing you to make any mods you want without effecting the unterlying table. You can then save that recordset.
 

Users who are viewing this thread

Back
Top Bottom