Bloating of ACCESS2000 Dbase

S

Slucci

I have a dbase that stores digital pictures seperate from
my data file. These pics (OLE objects) are combined with
data to create reports that include digital pics. I have a
picture database with 275 .jpg pics with an average size
of 25KB each. The database file that houses them is
275,000KB. Does anyone know why a 25KB .jpg file results
in a record equal to 1000KB when stored in ACCESS2000
Dbase?? Any ideas would be greatly appreciated..
 
D

Dirk Goldgar

Slucci said:
I have a dbase that stores digital pictures seperate from
my data file. These pics (OLE objects) are combined with
data to create reports that include digital pics. I have a
picture database with 275 .jpg pics with an average size
of 25KB each. The database file that houses them is
275,000KB. Does anyone know why a 25KB .jpg file results
in a record equal to 1000KB when stored in ACCESS2000
Dbase?? Any ideas would be greatly appreciated..

If you're storing your JPG image files, as images, in OLE Object fields
in the database, then you're going to get what appears to be massive
bloating. The reason for this is that Access stores image objects both
in the original image format (which, like the JPEG format, may be highly
compressed) *and* in a fully uncompressed bitmap format. So each of
your 25KB .jpg files may actually be megabytes in size when expanded to
a bitmap.

The simplest and most common way to deal with image files in Access is
to store the actual files in a designated folder on the hard disk, and
store only the name of the file, or the name and path, in the database
itself. When you want to display the image, use an unbound image
control on a form or report and set its .Picture property at run time to
the path to the image file.

If you really want to store the images inside the database, there are
techniques you can use to stuff the image data into a binary field and
extract it when you need to display it. Larry Linson has written a good
discussion of alternative image-handling techniques, with examples, at

http://accdevel.tripod.com/imaging.htm

and Stephen Lebans has done a lot of work with loading and working with
image files, but I'm not sure exactly which of his projects has the
functionality to save and display image data in OLE fields. Poke around
at

http://www.lebans.com

and see what you find.
 
L

Larry Linson

Slucci said:
I have a dbase that stores digital pictures seperate from
my data file..... Does anyone know why a 25KB .jpg file results
in a record equal to 1000KB when stored in ACCESS2000
Dbase??

Yes, it is explained in the article in the download (below) which also has
examples of two approaches that do not experience the bloat you describe.

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top