storing images in databases

antonyx

Arsenal Supporter
Local time
Today, 08:44
Joined
Jan 7, 2005
Messages
556
i am about to create a simple database for an estate agency..

they would like to have one image per record of the property (from the outside)

and 3 or 4 images per record of the property (interior shots)

how can you store images/multiple images in access for a particular record..im sure it has something to do with the ole object
 
You need to create a seperate table for the interior shots, and then reference this table to the Primary Key or your properties table.
 
It is almost always recommended NOT to store the image as an OLE, but rather to store just the path name, i.e. "C:\Program Files\ProgramName\Pics", and keep the actual pics in that location.

This may help a bit, but do a search for storing images and you will find several threads about this topic.
 
I agree with ssteinke. The method in the indicated in the article he links to is the preferred one. You can use the same method if an unbound image control on forms as well as report. For a Form you use the On Current event to set the imagepath.

In your case, since you want to store multiple images I would use a subtable like:

tblImages
ImageID (PK autonumber)
ImagePath
ImageDescription
PropertyID (FK)

You can then use a subform to display as many images as you need.
 

Users who are viewing this thread

Back
Top Bottom