Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267

    Unanswered: Duplicate Database on close

    Anyone else had this problem?

    I have a database that opens and works correctly. However, each time you close it the database leaves behind a copy of itself named db1.mdb, db2.mdb, etc. (It's not an ldb extension but an actual mdb.) It increments each time. Happens on multiple computers running Office 2003. The "left behind" mdb actually is fully functional except it will also leave behind a copy of itself.

    I've tried compact and repair to no avail. Just looking for any suggestions before I import the tables and forms into a new database.

    C

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    When you run a compact & repair the database actually creates a temp database called db1 (or db2, db3 as necessary) in the same directory as the original database. If the c&r goes well, it should do some renaming and then delete this temp database. If a c&r goes south, it usually leaves this file behind as a backup. Make sure that if you have the "Compact on Close" property checked yes, that it is compacting correctly on close and not throwing up an error that would result in leaving the temp mdb file there.
    Me.Geek = True

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I suspect that Nick has correctly diagnosed the problem; Compact on Close is checked, and the C & R isn't going well. The fact of the matter is that the Compact on Close option is one of the worst ideas Microsoft has ever come up with!

    C & R can, in fact, be a repeated cause of data corruption! This operation should never be done without making a backup of you file and storing it in a safe location!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    In short, turn OFF Compact on Close.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Zackly!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    Ok...so I turn off compact on close. What do I do about the bloat in the database now?

    C

  7. #7
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Well designed databases, even moderately well designed databases really don't bloat all that much. If you really feel you have a bloat problem, back up the database once a week and do a manual Compact.

    What kind of bloat are you talking about?
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    The database dynamically connects to SQL servers and will download data to internal temp tables (to speed up processing of reports and for some calculations, etc). After a few uses where data is downloaded and then removed the database size will grow significantly. I was thinking it was because of Access' wonderful job of reclaiming space in the table after all the data was cleared out. C & R had always reduced the size.

    C

    PS Thanks for the shot about the design of the database
    Last edited by canupus; 02-18-09 at 10:38.

  9. #9
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Temp tables, make tables, etc, will indeed cause bloat. So you may need to do a C & R daily, making sure to back up your files first.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by Missinglinq
    Well designed databases, even moderately well designed databases really don't bloat all that much. If you really feel you have a bloat problem, back up the database once a week and do a manual Compact.

    What kind of bloat are you talking about?

    ...or do it as part of, say, an overnight batch job, kicked off either as part of your backup or from windows scheduler
    I'd rather be riding on the Tiger 800 or the Norton

  11. #11
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    The cloning file launcher in the codebank solves this problem nicely.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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