Photos in access database...

G

Guest

I have an access database controlling information and creating details for an
estate agency. To create housing details pages, I need the photo's to be in
the database so they can be linked to reports. I have around 200 records
already in the database, all which require photographs. In my table I have
three OLE objects and I know how to insert jpeg images into them so that they
appear in reports. However, to do this for three photos for 200 records will
be very time consuming. Is there any way that I can insert a line of code
into the OLE object so that it automatically looks up that photo in relation
to the reference number of the record????????????


All replies greatly received!

Many thanks! :)
 
A

Allen Browne

The OLE Object field is not going to work. It causes the database to bloat
terribly.

A better approach might be to use a Hyperlink (or Text) field to store the
location of the photo on your drive. Then in the Current event of your form,
you can program it to load the photo into an Image control.

This article links to all the information you need:
http://www.mvps.org/access/forms/frm0030.htm
 
E

Exponent

If you have enough info to look-up the relevant file, then you may be able to display the file directly
in a report without needing to use the OLE Object fields at all.

Note that if you do need to store the images actually in the database tables, then the OLE Object field
is perfectly capable of this with little or no overhead compared to the file-system; it is, after all,
just a binary field.

The ‘bloat’ that is often referred-to is caused by the specific approach of using OLE Embedding or OLE
Linking with compressed image formats and certain OLE Server applications (such as MS Photo Editor – now
dropped in Office/Access 2003). Raw-binary (blob) storage avoids this and other problems with OLE Embedding
completely.

For further details, references and links to both free and commercial solutions see the articles below:

Common Access OLE Object Photo & Image Problems (inc Access 2003)
http://www.ammara.com/articles/accesspictureole.html

Efficient Access Image Storage – OLE Linking & Embedding vs raw-binary storage:
http://www.ammara.com/articles/imagesaccess.html

--
______________________________________________________

http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous
 

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