Tags: access, backend, code, compact, database, databases, external, frontend, microsoft, mysql, oracle, processing, run, sql, theresome

Compact an External Database

On Database » Microsoft Access

2,711 words with 3 Comments; publish: Fri, 06 Jun 2008 13:39:00 GMT; (250125.00, « »)

I have a database that does processing in several BackEnd databases. Is there

some code that I can run in the Processing FrontEnd that will Compact the

BackEnd databases?

All Comments

Leave a comment...

  • 3 Comments
    • You can use the CompactDatabase method of the DAO DatabaseEngine.

      What I always do is rename the database to something meaningful (like

      putting a date in its name, and/or changing the extension to .bak), then

      compact that renamed database to the "proper" name. That way, you have a

      backup as wrong.

      Doug Steele, Microsoft Access MVP

      http://I.Am/DougSteele

      (no e-mails, please!)

      "cbjames" <cbjames.ms-access.questionfor.info.discussions.microsoft.com> wrote in message

      news:CA2647D8-0F07-4B10-B5C5-E2AA70B77389.ms-access.questionfor.info.microsoft.com...

      >I have a database that does processing in several BackEnd databases. Is

      >there

      > some code that I can run in the Processing FrontEnd that will Compact the

      > BackEnd databases?

      #1; Fri, 06 Jun 2008 13:40:00 GMT
    • "Douglas J. Steele" <NOSPAM_djsteele.ms-access.questionfor.info.NOSPAM_canada.com> wrote in

      news:OS8Xlp0BGHA.3528.ms-access.questionfor.info.TK2MSFTNGP12.phx.gbl:

      > You can use the CompactDatabase method of the DAO DatabaseEngine.

      > What I always do is rename the database to something meaningful (like

      > putting a date in its name, and/or changing the extension to .bak), then

      > compact that renamed database to the "proper" name. That way, you have a

      > backup as wrong.

      I have a little function I created with the help of these news groups

      http://www.treeful.com/fCompactBE.txt

      It runs automatically in one of my DB's after 6 PM. I believe it is still

      functioning properly. But I have not tested it for some time.

      Bob

      TO reply via e-mail, change the xxx in the address to bob_

      #2; Fri, 06 Jun 2008 13:41:00 GMT
    • I used this method and it works great. Thanks!

      "Douglas J. Steele" wrote:

      > You can use the CompactDatabase method of the DAO DatabaseEngine.

      > What I always do is rename the database to something meaningful (like

      > putting a date in its name, and/or changing the extension to .bak), then

      > compact that renamed database to the "proper" name. That way, you have a

      > backup as wrong.

      >

      > --

      > Doug Steele, Microsoft Access MVP

      > http://I.Am/DougSteele

      > (no e-mails, please!)

      >

      > "cbjames" <cbjames.ms-access.questionfor.info.discussions.microsoft.com> wrote in message

      > news:CA2647D8-0F07-4B10-B5C5-E2AA70B77389.ms-access.questionfor.info.microsoft.com...

      >

      >

      #3; Fri, 06 Jun 2008 13:42:00 GMT