By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,040 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,040 IT Pros & Developers. It's quick & easy.

Placing jpgs (photos) in my A2K database

P: n/a
Can someone please help me with this? I am trying to put my jpg photos in my
database. Access books seem to avoid the issue of graphics in DB tables and
my searches on the internet seem to point me away from putting photos into
tables (ultimately on forms). Has anyone successfully put viewable jpg's in
their forms?

Thanks Jeremy
Nov 12 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
While it's possible, it's generally not recommended, since Access tends to
be very inefficient at storing images.

Check http://www.mvps.org/access/forms/frm0030.htm at "The Access Web" for
pointers to a few articles that discuss this issue. (While the articles
refer to Access 97, or even Access 95, things haven't changed in later
versions)

If you're really determined to do this, though, check what Stephen Lebans
has at
http://www.lebans.com/loadsavejpeg.htm

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Jeremy Simpson" <jp********@ozemail.com> wrote in message
news:XW*****************@nnrp1.ozemail.com.au...
Can someone please help me with this? I am trying to put my jpg photos in my database. Access books seem to avoid the issue of graphics in DB tables and my searches on the internet seem to point me away from putting photos into
tables (ultimately on forms). Has anyone successfully put viewable jpg's in their forms?

Thanks Jeremy

Nov 12 '05 #2

P: n/a

Jeremy,

On Sun, 4 Jan 2004 21:28:57 +1100, "Jeremy Simpson"
<jp********@ozemail.com> wrote in comp.databases.ms-access:
Can someone please help me with this? I am trying to put my jpg photos in my
database. Access books seem to avoid the issue of graphics in DB tables and
my searches on the internet seem to point me away from putting photos into
tables (ultimately on forms). Has anyone successfully put viewable jpg's in
their forms?


Its not a question of whether it can be successfully done. It can.
In fact, its very easy to do this - easier than it is to do it thr
right way and NOT store the images in the db.

The reason why everyone who thinks through these issues seems to turn
away from embedding the pictures in the db is that there is really no
benefit to this, and there are many downsides. Doug pointed you to
several references, but I would simply add that you really need to sit
down and ask yourself why it is that you think the pictures are better
handled by putting them in the db rather than simply storing their
path info in the db.

Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Nov 12 '05 #3

P: n/a
The sample databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access. One uses External Files, but that
is not always the best approach; the other two store the information in the
database (one causes database bloat, the other does not). There's an article
discussing considerations in choosing which approach is best to use in your
specific case.

Larry Linson
Microsoft Access MVP

"Jeremy Simpson" <jp********@ozemail.com> wrote in message
news:XW*****************@nnrp1.ozemail.com.au...
Can someone please help me with this? I am trying to put my jpg photos in my database. Access books seem to avoid the issue of graphics in DB tables and my searches on the internet seem to point me away from putting photos into
tables (ultimately on forms). Has anyone successfully put viewable jpg's in their forms?

Thanks Jeremy

Nov 12 '05 #4

P: n/a
pm*****@pksolutions.com (Peter Miller) wrote in
<cl********************************@4ax.com>:
On Sun, 4 Jan 2004 21:28:57 +1100, "Jeremy Simpson"
<jp********@ozemail.com> wrote in comp.databases.ms-access:
Can someone please help me with this? I am trying to put my jpg
photos in my database. Access books seem to avoid the issue of
graphics in DB tables and my searches on the internet seem to
point me away from putting photos into tables (ultimately on
forms). Has anyone successfully put viewable jpg's in their
forms?


Its not a question of whether it can be successfully done. It
can. In fact, its very easy to do this - easier than it is to do
it thr right way and NOT store the images in the db.

The reason why everyone who thinks through these issues seems to
turn away from embedding the pictures in the db is that there is
really no benefit to this, and there are many downsides. Doug
pointed you to several references, but I would simply add that you
really need to sit down and ask yourself why it is that you think
the pictures are better handled by putting them in the db rather
than simply storing their path info in the db.


There is one scenario where there is a benefit to storing OLE data
in your database: replication.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #5

P: n/a

On Mon, 05 Jan 2004 00:12:45 GMT, dX********@bway.net.invalid (David
W. Fenton) wrote in comp.databases.ms-access:
There is one scenario where there is a benefit to storing OLE data
in your database: replication.


Agreed. Also, if there is so little ole data to be stored that th
method used matters little, then I'd have no problem storing it within
the database, but where a substantial amount of such data is to be
stored (and the measure of how substantial it is is size, not
recordcount dependant), I'd highly advise against storing it within a
jet backend directly.

Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Nov 12 '05 #6

P: n/a
I've done considerable work on this and feel that the best way is
pretty much what is reflected in the other answers given above. I use
a pre-determined path stored in a table (generally one record with
various settings in). This excludes the filename and extension. (you
could store this in the registry or a file if you prefer).

I build up a full path using the one mentioned above, the ID of the
record which relates to the image and then the extension. Each image
is stored as the ID number plus .jpg in the correct folder. If you
need to move the images, you simple move them and change the path.

So, you would programatically build a full path using details from the
current record. This then will modify a linked image on the form or
report and display it. If you use the OnCurrentRecord event to
generate this, it will change the image when you move to a new record.

It works quite nicely. There are some screens shots on my web site if
you fancy a look. I'd be happy to help with the code if you need some
pointers.

This can be done on both forms and reports.

www.ryan.dial.pipex.com
Nov 12 '05 #7

P: n/a
Hi

I had a similar problem some time back and ended up downloading a commercial
program DBpix.exe from www.ammara.com

It has worked very well for me in several installations . . but you do need
to register and pay.

Still if the client wants jpeg pic handled well . . it will do the trick . .
if only they sent out commision payments . .grin . . hint . .

cheers paul g

"Peter Miller" <pm*****@pksolutions.com> wrote in message
news:6k********************************@4ax.com...

On Mon, 05 Jan 2004 00:12:45 GMT, dX********@bway.net.invalid (David
W. Fenton) wrote in comp.databases.ms-access:
There is one scenario where there is a benefit to storing OLE data
in your database: replication.


Agreed. Also, if there is so little ole data to be stored that th
method used matters little, then I'd have no problem storing it within
the database, but where a substantial amount of such data is to be
stored (and the measure of how substantial it is is size, not
recordcount dependant), I'd highly advise against storing it within a
jet backend directly.

Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051

Nov 12 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.