MS Access Embedded/Linked images problem

P

Paul Telco

Hi,

Does anyone know why the OLETypeAllowed = acOLELinked and
acOLECreateLink result in embedded jpg files? The whole procedure I'm using
is shown below.

It's a mystery to me!

Paul

Private Sub SetOLEImage(ImageFile$)
' Attach Image file to field for OLEDiagram

OLEDiagram.Class = "Bitmap Image" ' Set class name.
OLEDiagram.OLETypeAllowed = acOLELinked ' Specify type of object.

OLEDiagram.SourceDoc = ImageFile$ ' Specify source file.

OLEDiagram.Action = acOLECreateLink ' Attach the image
OLEDiagram.SizeMode = acOLESizeZoom ' Adjust control size
Me.Refresh

End Sub
 
E

Exponent

The exact behavior depends on the specific OLE Server application used to Embed or Link, but the likely
answer is that both Embedding and Linking can cause an uncompressed 'Preview' image to be stored in the
field. In the case of jpeg this can be anything from 10 to 200 *times* the original file size, so any
space saved by linking is dwarfed by this (to see a comparison using real world images and values see the
article referenced below). This, along with configuration and other issues, make OLE Embedding and OLE
Linking of limited value when dealing with compressed images.

The OLE Object field can still be used very effectively when storing raw binary data, and if you really
want to ‘Link’ then just store the filename in a text field (or generate it at runtime from and Id, for
example).

More info and data comparing OLE Embedding, Linking and raw-binary storage can be found here:
http://www.ammara.com/articles/imagesaccess.html
 

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