Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture library in MS Access

Status
Not open for further replies.

SUnderwood

Programmer
Nov 21, 2002
107
GB
For my next project I have to in some way associate images (bmp, jpg, gif etc) with database records stored in access. The number of images to be stored/associated with the database records will grow, and grow, and grow ...

Now, I don't want to reinvent the wheel, and this siutation has cropped up millions of times across the world, so I'd like to know, in your views, what would be a neat "system" of associating images with records stored in MS Access.

Sean
 
You can have two option to my mind:

a) use an OLE memo field and store the picture in the database, and display it on a form.
This will make the MDB file absolutely huge though, especially if you are having lots of images.

or
b) Store a path to the filename in a text field and load it into an image box on a form. A little error trapping to check the file exists wouldn't go amiss if this is your chosen method because it becomes all to easy to delete or rename the file, or move it somewhere else and not update the database information.

John
 
These are the two option I could think of. As you mention storing the images in access will make a HUGE db - not good. Storing only the link could be a better approach. In addition o this I had thougth of moving the linked pictures to an appropriate directory structure to provide one point of backup and ease of image location for future manual browsing.
 
If you want to store images is there the possibility of using something other than Access?
I have found a proper database for storing images available from
I have found a few links regarding image database theory (rather than text) and they say in general "go for an object database" rather than relational.
If you are interested, the links are as follows:


It doesn't really answer your question, but I suppose there is always the possibility of storing the data in a client/server DbMS and using Access as a frontend to it, just like with MSDE/SQL Server for example.

John
 
I would try to link in ACDsee.

He makes a database with all your pictures, I think you also could make out of Access an OLE link for preview.

Quite fast program - and a must o have.

George
 
What are the pictures of?
Is there a field in the table that relates to the pictures?
Are the pictures going to be different file types (jpg,gif,bmp) or are you asking which is best suited for this purpose?
 
The pictures will be jpgs or bulding repairs before and after.

I am interested to see how other have used a growing library of pictures with their databases so that i can choose the best stratergy when i cme to start implementing the functionality today.

I think I'm going to take the following approach.
1) Using the Insert Picture dialog box in Word or my own customer box, allow the user to navigate and find the picture they want to associate wit the record.
2) Move/copy the picture to a picture library directory structure which is keyed on the PK (and other fields) of the record
3) Store the resulting file's path and name in a related table.
4) Allow the pictures to be viewed on a form using a linked image object which is updated from a list of linked images.

This eems to be the best method because 1) database size is minimised, 2) no OLE code used to bloat my database, 3) neat and simple approach.

What do you think?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top