Results 1 to 10 of 10

Thread: compacting database with DAO

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    u.s.a
    Posts
    127
    I am trying to compact a database using DAO.
    Is this possible?
    Thanks.
    Dan.

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    DBEngine.CompactDatabase olddb, newdb, locale, options, password

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Code:
    DBEngine.CompactDatabase sDBName, "compact.bak"
    Kill sDBName
    Name "compact.bak" As sDBName
    Only the first line is necessary. It compacts the database name contained in sDBName to a new database named compact.bak.

    You can also repair the database with DBEngine.RepairDatabase sDBName

    [Edited by MartinLiss on 08-01-2000 at 01:58 PM]

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    u.s.a
    Posts
    127
    Martin you are one sexy man...

  5. #5
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    <heh> I feel another question coming...

  6. #6

  7. #7
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Not if it's your wife being asked...<heh>

  8. #8
    Guest

    Thumbs up Just a thought............

    ........backup your database before the compact in case something goes really wrong

  9. #9

  10. #10
    Guest

    Thumbs up Martin, like the joke even an Aussie can get that one

    Was just pointing out the requirement, have had people getting confused by the fact that the compact command doesn't compact the actual database but compacts to a backup version.

    We generally then datestamp the original, copy it to an archive, and copy over the compact version. Of course this allows for reverting to the original db if the machine goes down mid-process or something.

    Had some one here post they stuff their database while running compact from the Database Addin thing, they didn't understande the actual process involve. Probably due to expierance in one of the xbases which don't actually create a new compacted database.

    My motto is better safe than sorry

Posting Permissions

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



Click Here to Expand Forum to Full Width