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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Pictures to a Database

Status
Not open for further replies.

trickster99

Technical User
Oct 22, 2002
1
0
0
CA
I have a database that requires a picture for every record. I have been linking the .jpg files as OLE objects. After 200+ pictures my database is 1GB in size !!! (One 100kb .jpg increases the DB size by 5MB)
How can I get these pictures out of my main database and link them externally? (ie specify a LINK to these pictures by path name like C:\my pictures\Image1.jpg)

 
I know exactly what you are talking about. Linked photos take up less space for some reason. I am looking for a better way, but my solution to date is:

Add a field to your table "Photo"
Add a txt box to your form "Image Path"
Add a image frame to your form "imageframe"

The link path for the photo location goes in the "Photo" field. I have the control source property for "Image Path" set to the "Photo field". The "image frame" is linked to these so it displays the photo for the current record. There is a bunch of coding that needs to be done as well. Goto the Northwind sample database where individual employee records are on a form along with their photo. The code is there. The one thing I havn't gotten over, is the delay of loading the photo when clicking between records.
 
I agree with Bangsmic. I cannot see a reason to put image, or other binary data, into the database itself, except for if there is a security need. You should always link your database to the image files located in a given directory and have the application, Access or other, load the image file from that file system location.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top