Access ok with photos?

M

Michelle

I want to put an inventory of costumes on a database that includes photos of
the costumes. Can Access do this?
 
J

Jack Cannon

I will echo Chris' warning. Storing the actual photograph within the
database will cause the database to grow much too large. In fact you might
want to consider storing the photographs on a CD, which will allow the
database to be more portable.

I use a common path to related photographs. The photographs are saved with
the primary key as the filename (12345.jpg). While this ensures that
photographs are not confused it does force the user to use the application to
locate a particular photograph instead going directly into the storage media
to locate it.

Jack Cannon
 
D

Dirk Goldgar

Jack Cannon said:
I will echo Chris' warning. Storing the actual photograph within the
database will cause the database to grow much too large. In fact you
might
want to consider storing the photographs on a CD, which will allow the
database to be more portable.

I use a common path to related photographs. The photographs are saved
with
the primary key as the filename (12345.jpg). While this ensures that
photographs are not confused it does force the user to use the application
to
locate a particular photograph instead going directly into the storage
media
to locate it.


Note that Access 2007 has vastly improved its storage of images, so that
they don't bloat the database outrageously the way they used to. So you can
now store a moderate number of small images in the database without a
problem. However, images are still generally quite large in comparison to
the other data that would be stored in most databases, and there is a
maximum limit of 2GB on a Jet (Access) database, so you need to take that
into consideration when deciding whether to store your images in the
database itself or, as Chris and Jack have suggested, in a folder on your
hard disk. If you anticipate having a lot of images, or very large ones, I
would definitely do it the latter way.
 
D

Dirk Goldgar

(Re-posting, as my original reply hasn't appeared.)

Jack Cannon said:
I will echo Chris' warning. Storing the actual photograph within the
database will cause the database to grow much too large. In fact you
might
want to consider storing the photographs on a CD, which will allow the
database to be more portable.

I use a common path to related photographs. The photographs are saved
with
the primary key as the filename (12345.jpg). While this ensures that
photographs are not confused it does force the user to use the application
to
locate a particular photograph instead going directly into the storage
media
to locate it.


Note that Access 2007 has vastly improved its storage of images, so that
they don't bloat the database outrageously the way they used to. So you can
now store a moderate number of small images in the database without a
problem. However, images are still generally quite large in comparison to
the other data that would be stored in most databases, and there is a
maximum limit of 2GB on a Jet (Access) database, so you need to take that
into consideration when deciding whether to store your images in the
database itself or, as Chris and Jack have suggested, in a folder on your
hard disk. If you anticipate having a lot of images, or very large ones, I
would definitely do it the latter way.
 
K

ken

To display an image on a form you can add include a text field in its
underlying table in which the path to the image file is stored. On
the form include an Image control and set its Picture property to the
path in the form's Current event procedure like so:

If Not IsNull(Me.ImagePath) Then
Me.Image1.Visible = True
Me.Image1.Picture = Me.ImagePath
Else
Me.Image1.Visible = False
End If

where ImagePath is the name of the field in the table and Image1 is
the name of the image control. You can do similarly in a report by
putting the same code in the report's Detail section's print event
procedure. A report differs from a form in one respect, however;
while you don't need a control bound to the ImagePath field on the
form, in a report you do need such a control in the detail section,
but you can set its Visible property to False (No) to hide it.

You'll find a demo of a more complex means of doing this at:

http://community.netscape.com/n/pfx...libraryMessages&webtag=ws-msdevapps&tid=23913

In the demo multiple images can be attached to each record and shown
on demand by selecting from a list box. I'm not sure how up to date
the file in the library is. I did amend it at some stage in response
to a request by somebody so that a user can select specific images per
record for display in the report. If you'd like the latest version
(itself pretty old now!) mail me at:

kenwsheridan<at>yahoo<dot>co<dot>uk

Ken Sheridan
Stafford, England
 

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