![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
No need to go to all that trouble. Keep a spare, empty copy of the db, called (eg) <DbName>_Original.mdb. When your app terminates, delete the current <DbName.mdb> using the Kill command, and make a copy of the original, using the FileCopy command: FileCopy "<DbName>_Original.mdb", ""<DbName>.mdb" (replace <DbName> with the name of your mdb, of course) Wouldn't dbname.mdb be in use? Sorry, I missed that you were talking about a FE. In that case, use a batch file to start the FE, followed by: DEL "dbname.mdb" COPY "dbname_original.mdb" "dbname.mdb" (including paths if necessary) So a complete batch file might look something like: @echo off "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" DEL "C:\FE Folder\dbname.mdb" COPY "C:\FE Folder\dbname_original.mdb" "C:\FE Folder\dbname.mdb" Hope that helps |
#12
| |||
| |||
|
|
On Fri, 18 Nov 2011 08:34:58 -0000, "Stuart McCall" smccall (AT) myunrealbox (DOT) com> wrote: "PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote in message news:65jbc7565hic48g0vi6erinoidmagcm7va (AT) 4ax (DOT) com... On Thu, 17 Nov 2011 16:02:24 -0700, Tony Toews ttoews (AT) telusplanet (DOT) net> wrote: On Thu, 17 Nov 2011 12:23:53 -0700, PW emailaddyinsig (AT) ifIremember (DOT) com> wrote: Queries do use storage in the database that contains the query, and, as has been stated for many releases, storage used (not just records) is recovered by compacting. Many of us have experienced growth of a 'front end' database when we execute queries, but, in my experience, that growth was not 'excessive'. My experience with 'excessive' growth has been with databases containing tables and subject to heavy update and deletion activity Ah ha! Just as I suspected. It is interesting watching this size of the front end keep increasing the more I run the queries. It's at 30KB to begin with, then increases up to 720 depending on how many times I run the form. I assume that would keep on increasing. I've noticed a 20 Mb front end increasing 1 or 2 Mb and then settling down. Not a mere 1 or 2 MB increase. And it doesn't settle down. I'll second Doug's suggestion about using a temporary _database_ to contain your temporary tables, as documented on Tony Toew's site. Will do! But won't that database also keep increasing in size? Delete it when you're done or when the user exits the FE. Creating an MDB, along with tables and indexes, on a local hard drive is so fast you won't even notice it. Tony Delete the database? Recreate all the tables in code each time the form is run? What about all the queries, which is the problem? -pw No need to go to all that trouble. Keep a spare, empty copy of the db, called (eg) <DbName>_Original.mdb. When your app terminates, delete the current <DbName.mdb> using the Kill command, and make a copy of the original, using the FileCopy command: FileCopy "<DbName>_Original.mdb", ""<DbName>.mdb" (replace <DbName> with the name of your mdb, of course) Wouldn't dbname.mdb be in use? |
![]() |
| Thread Tools | |
| Display Modes | |
| |