Embedded & Linked images

T

Tony Epton

Usually I do very vanilla, industrial grey work for clients and avoid
anything slightly out of the ordinary.

However, this time they need to store pictures in their asset register
and I have turned once more to this old chestnut.

The first step is that I have moved their images in to a separate
dabase.

Here is a little experiment I did.

1) inserted the same 94Kb jpg image (as a linked object) in to 8
successive records of the database, compacted the database - size =
11.3 Mb

2) inserted the same 94Kb jpg image (as an embedded object) in to 8
successive records of the database, compacted the database - size =
16.9 Mb

3)thinking that huge size is caused by storing a working copy of the
image (whether linked or embedded) as a bmp - I checked out the image
size if saved as a standalone bmp - only 692 Kb

4)while working with the 8 records with the linked images - picked the
entire image directory up and moved it across the network to another
machine - could still edit the linked images and the "Save As" in the
graphics program demonstated it definitely knew the new location of
the images.

Questions
1) Why is the database SOOO big ? I know it stores a copy of the ole
object in the database - whether linked or embedded - but worst case I
would expect is 8 times 692 Kb - ie about 7Mb ?

2) How is it being so clever and finding the linked images when I move
them ?

3) I have my own little database that drives my web site and for every
record in the database I also have one or more images in a particular
set of image directories - the record just knows the name of the image
- and a tiny bit of the code quite happily tweaks in the ".picture"
property of the linked image object on my input form - it's lean and
mean and works well.
(we are talking about my MS Access front end here for maintaining my
database - not the vb script that runs the web site)
I would like to do the same thing for my client - ie - don't store
images as ole objects in a database - store them as files in a
directory.
However - if they ever wanted a report of their asset database showing
a little image of each asset next to its description on the report -
how could I make that work ? - I only know how to do it if the images
are available as ole objects in a table

Many thanks in advance
Tony Epton
 
T

Tony Epton

Sorry - I should have stated:

running under Win 2000 SP 4 using Access 2002 SP 1
 
L

Larry Linson

However, this time they need to store
pictures in their asset register and I have
turned once more to this old chestnut.

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.

I think the article included in the download probably answers your questions
about database bloat and the alternative methods will allow you to avoid it.

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