How do I get Access to release space for deleted records at run ti

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that is more than 2 gigabytes. So I get an error. I cannot
reduce the size of the query. Once I get the append query dumped into an
access table, I loop through it in code and delete unwanted records. And then
I do another query and dump into the same table and loop through records in
code to delete the unwanted. But I am told that Access does not release the
space in my deleted records so access acts like I never deleted anything as
far as the table size is concerned. Is there some way I can do this in code
so after i loopo through unwanted records and delete them and before my next
query, access releases the space it hold for the previously deleted records.

something like "compact and repair" in code at runtime or maybe refreshing
of a table??
 
Hi Adam,

When working with 'temporary' data it is better to create a temporary
database, import or append the data into the temporary database, get what
you need into the permanent database and then close and delete the temporary
db. This is actually not too hard to do - Tony Toews has an example you can
follow: http://www.granite.ab.ca/access/temptables.htm

You might also want to reconsider whether you have to deal with the full
2gig - that seems huge. Where does the data originate? Is there any way to
filter it before you bring it into Access?
 
Back
Top