Computing.Net > Forums > Programming > Access database uses so much space

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Access database uses so much space

Reply to Message Icon

Name: Antilon
Date: November 1, 2003 at 12:53:39 Pacific
OS: XP
CPU/Ram: 900 MHz, 512 MB
Comment:

Dear friend,
I'm making some small application for making catalogue of MP3 songs. I have created an Access database with 4-5 tables. I don't need a lot of informations. I just have several fields there: Artist, Song, Path...

But, today when I have saved about 18.000 files in my database it groved up to 10MB. Is that normal? I have restricted all fields at minimum chars. Even then my database is so big. If I remove all data from tables to send app to my friend, a database is still 10MB. Is there some reason for that? What do I should to do to make it smaller....

Thank you a lot from Bosnia!

Antilon



Sponsored Link
Ads by Google

Response Number 1
Name: Rami
Date: November 1, 2003 at 16:21:46 Pacific
Reply:

Well you can put the Access database in a Zip file, it will make the overall size smaller.

You can download Zip from the internet.


0

Response Number 2
Name: Stuart
Date: November 1, 2003 at 16:32:58 Pacific
Reply:

Antilon

This is normal behaviour. Access allocates database space in chunks as it is needed. Just deleting records doesn't release this pre-allocated space. You can compress the database in Access to get rid of this unused pre-allocated space.

See: Tools/Database Utilities/Compact and Repair Database.

However, it will start growing again pretty fast as soon as you start adding more records.

Stuart



0

Response Number 3
Name: Fozzie
Date: November 1, 2003 at 19:02:09 Pacific
Reply:

I don't know much at all about Access, but I know someone who does and she told me that Access can be configured to compress data every time the program closes.

Try looking in the program preferences or settings. That might help fix the problem.


0

Response Number 4
Name: Stuart
Date: November 1, 2003 at 19:16:47 Pacific
Reply:

Access can be configured to compress itself everytime the Database close. Requires a bit of programming to do it. However its not necesarily a good idea on a database that is being constantly updated.

Fine on a database that is only going to be read and very little modification done to it, in which case compressing it every time it closes is a waste of time.

Likewise, every time it is modified it will expand back to its original size or close to it, again a waste of time. The only proper time to use the Repair and Compress routine is after a number of deletions have been made.

Stuart


0

Response Number 5
Name: Antilon
Date: November 2, 2003 at 02:54:21 Pacific
Reply:

I found how to do that: Using JRO

Dim JRO As JRO.JetEngine
Set JRO = New JRO.JetEngine
JRO.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=C:\baza.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=C:\baza2.mdb" _
& ";Jet OLEDB:Engine Type=5"

Thanks to all of you for your help!


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Access database uses so much space

Accessing Access Database with password www.computing.net/answers/programming/accessing-access-database-with-password-/1841.html

Get file version of an Access database www.computing.net/answers/programming/get-file-version-of-an-access-database/1849.html

Create a table in access 2002 using VBA www.computing.net/answers/programming/create-a-table-in-access-2002-using-vba/2644.html