Saving pictures in a record

A

Andy

Is it possible to import pictures into a record of a
table? I need to have 3 pictures per record... Can I
import all 3 directly into a specific record or is there
another way to go about it?

Please let me know!

Andy
 
R

Roger Carlson

The usual solution is not to store the pictures in the database at all.
Just leave them in a directory and store only the path to the picture(s) in
the database. Then you can load them at run time into your forms and
reports.

On my website (see sig below) called "Picture.mdb" which illustrates how to
do this.
 
B

Bas Cost Budde

Andrew said:
Can I then store more than one path in a record?

Sure, have three fields in the table.
If you have a varying number of paths, though, consider using a sub
table. Read on "normalisation" (or is it spelled with z this time?).
 
R

Roger Carlson

Yes, as Bas said, you can use three fields or a separate table. Here's how
to decide:

If the picturesare of DIFFERNT things, i.e. a person, a map, and an
insignia, then you could store them in separate fields in the same record.
By the rules of normalization (yes, it is a 'z') they represent different
things and can therefore be in the same record.

However, if they represent the same thing, one or more pictures of a person,
map or insignia, then there should be a separate table holding them. (I
don't want to mislead you, it could also be pictures of different people,
maps or insignia as long as they fit the same category.) In this table,
there would be a Foreign Key field that holds the the value of the
corresponding Primary key in the main table and a single field to hold the
path. Each picture would have a separate RECORD in the other table, not a
separate FIELD.

Something like this:

tblMain tblPictures
------------ ----------
MainID (pk)--| PictureID (pk)
other fields.. |--<MainID (fk)
PicturePath
 

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