Results 1 to 4 of 4

Thread: Compress DB

  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Unanswered: Compress DB

    Is there any line command to compress the DB using code in VB
    Soemthing like
    DoCmd.CompressDB
    or else
    Thanks

  2. #2
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    You could check the help on DBEngine.CompactDatabase... Unfortunately, this DAO command cannot be called from your database, it must be from another one.

    There is also a setting under Tools/ Options/ General for "compact on close" which works fine for single user dbs. Not the greatest idea for a DB that my be used by more than one person at a time.

    jp
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Thank you that is also fine, when you could compress a closed DB. I found it under
    application.DBEngine.CompactDatabase

    Thanks again

  4. #4
    Join Date
    Oct 2003
    Posts
    706

    Exclamation

    As I have said elsewhere today... "generally speaking, an Access database should be left alone, not compressed." It is designed to be a self-maintaining structure and it will be. Sure, the file might grow to be quite large indeed, but so what? The space is being recycled.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •