Results 1 to 9 of 9

Thread: My Access DB is INFLATING Like a Balloon!

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    4

    My Access DB is INFLATING Like a Balloon!

    Hi All,

    I'm working on an app in VB6 Pro that reads/writes to an Access 97 DB. When the DB was first created it was 94k. But after I run the app and clear the data from the database several times, I notice that the DB keeps getting bigger. The DB has only 3 tables and no more than 10 fields per table. At one point this DB was 20MB after I deleted all the data. Does anyone have any idea why this is happening and how I can fix it?

    Thanks,
    Scott

  2. #2
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Hi Scott,

    The reason it is "inflating" is because when you delete something out of access it actually isnt really deleted.
    It is held in access until you "compact" the database!

    So you just have to compact it!

    Are you using a replica set by chance?

    ciao
    b

  3. #3
    Member MasterEvilAce's Avatar
    Join Date
    Jul 2002
    Posts
    60
    open the database in Microsoft Access and look for the option to compact
    and there you go!

    you can also compact it using VB.. search the forum, or i can post code

  4. #4
    Lively Member
    Join Date
    Sep 2002
    Posts
    103
    If something that is deleted is still in the database until it is compacted, is it possible to 'undelete' this. If so - how?

    Aidan

  5. #5
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    You can compact your database form your software too... Look at the tip form vbworld: http://216.26.168.92/tips/tip482.html
    "Experience is something you don't get until just after you need it."

  6. #6
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    Originally posted by aidan
    If something that is deleted is still in the database until it is compacted, is it possible to 'undelete' this. If so - how?

    Aidan
    It is deleted, but the space for this data is not given free.

    So unless you compact the db it keeps growing even if you delete all rows from all tables each day
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  7. #7
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    Originally posted by aidan
    If something that is deleted is still in the database until it is compacted, is it possible to 'undelete' this. If so - how?

    Aidan
    Isn't that called a rollback??? I'm not so experienced in Databases, so I'm guessing here...

    I have no idea how to do such a thing though...
    "Experience is something you don't get until just after you need it."

  8. #8

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    4

    Thank You

    Wow! Thanks for all the replies... big help! I didn't know about compacting the database... doh! Anyway, thanks again, and thanks for the link to the code.

    Cheers!
    Scott

  9. #9
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    No problem at all...

    Could you place *RESOLVED* in your subject (after the current one) so that when users search they know that this one has an answhere...


    Good luck!
    "Experience is something you don't get until just after you need it."

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