Images

T

Trond Hoiberg

What is the best way to handle images in an access database?( OfficeXP). I
have a table T_Products and one column is defined as OLE Object.
I then add pictures by linking them, not inserting. But still the database
gets huge. The database without images is 10Meg. I have some 2500 images i
want to link, but after linking 250 the database is 1,5 GB? And all the
pictures together (all 2500) is 300 MB.
I guess there is a lot af additional imformation that is stored together
with the image link, but obviously this is not the optimal way to deal with
images in an access DB.
Is there a tool or some other way i can do this? I need to be able to print
out reports in access with images.
If the application was ASP the story would be another since i only need to
add the image name to the database then :)

Best regards
Trond
 
J

James Goodman

Whenever I use images within a DB, at most I only store the path to the
file. I wrote a sample db which can be found here:
http://www.angelfire.com/sports/f1pictures/AccQuestion3.htm

My preferred method is to get images stored in accordance with a pre-defined
naming system. You can then 'calculate' where an image should be, & if found
display it. This eliminates the need for the user to provide a path...
 
T

Trond Hoiberg

Thank you.
Can this be done in a continous form? I have some 2500 products in a
database and they all have a product number like 230095 (6 numbers). I
created a query that builds up the string "C:\ProdBase\Images\230095.jpg"
SO every product has an image that has the same name as the productnumber.
Product 320985 has an image 320985.jpg.

The query is constructed like this: ImagePath: 'C:\ProdBase\Images\' &
[ArticleNumber] & '.jpg'

I have managed to get the picture to show in the imageboks, but only if i
click on the line representing the record in a continous form. The selected
records image is then displayed in all the image boxes.
A page can have some 200 products (i filter them) and that means 200 diff
images. Phuuu my english is bad and thus the heavy explanation :)
Is there a way to load the correct image into every imagebox?
Best regards
Trond
 
L

Larry Linson

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
 
T

Trond Hoiberg

Case closed. I found a nice component DBPix that solved my problems. I use
it to add the images to the database and the DB hardly grow compared to
using the standard Access imagebox and inserting images using "the microsoft
way"
I contacted the people at DBPix asking if that component could help me out
of a difficult situation and boy did they help. They even gave me the code
to import all images into the DB. All 2500.
If you need to be able to do a lot of work with images within your access
application I strongly recomend DBPix
Best regards
Trond
 

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