Page 1 of 1

Empty, Delete and Drop Tables -- Access DB

PostPosted: Mon Oct 15, 2007 7:46 pm
by beno

I have a program that creates a Access database.

It creates a table dynamically where some temprary data is stored. But this process is heavily used.

Once I need to update this table I have tried:


But I can observe how the .mdb files grows each time I run this process.

It seems that the previous values stored in this table remains there ... and the file grows a similar amount of Kb each time I Delete/Empty/Drop and create it again and do my stuff to store the new values there.

Mmmhh ... As this process is going to be used real frequent for this project I do not like the idea that my database file will keep growing wild.

Is not supposed that the Dropped or Empty data in the table should dissappear?

What do I´m missing?

In the .dbf world there was a Delete---> Pack and this last one get rid nice of the deleted stuff...

Ideas? ... is this a bug?



PostPosted: Mon Oct 15, 2007 8:24 pm
by Gaev

It says here that You must close the table before you can delete it or remove an index from it..

So, try and invoke dbpCloseTable BEFORE you do the dbpDropTable/dbpEmptyTable commands.

PostPosted: Mon Oct 15, 2007 8:49 pm
by beno
Hi Gaev,

Thanks for your help.

Mmmh it seems to make no difference.

In the meantime I have isolated this temporary table to a temporary database. So at the end of my program I close this database and get rid of the database file.

Well, not the best solution and a real dirty trick...

But in the meantime is better for me.



PostPosted: Tue Oct 16, 2007 10:42 am
by Neosoft Support
It may be possible to add an action to compact Access databases to a future version of DBPro. I will look into it.