Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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.

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

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.

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

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!

![]() |
![]() |
![]() |

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