Inserting images in database to later view in report

  • Thread starter Thread starter Xcite
  • Start date Start date
X

Xcite

Guest
When inserting images in a database for later view in Reports, often the best solution is to write the file pathname in the database and add a simple command in VB (Visual Basic) so that the images are loaded in the report according to each specific element in the database.

To accomplish this I used the following code in VB:

Private Sub Detalhe_Format(Cancel As Integer, FormatCount As Integer)
Me![Name of the image control in the Report Design mode].Picture = Me![Database row name – includes the file pathname]
End Sub

:cool:

The other solution is to embed the image in the database itself. :eek:

As most of you know, the embedding procedure increases the database size at an exponential rate (the exact rate is unknown to me but the more images you add the bigger the database file). :confused:

The first solution is best because the database file size tends to be small. :D

What I found out was that the above is true but only to a certain point. My database contains several hundreds of entries. All with a specific image file pathname. When previewing or attempting to print, Access tries to load up all the information into the memory. The result is a memory overflow (my memory specs: 1 GB hardware + 1 GB Virtual). :eek:

Before using the file pathname method, I add the images embedded in the database and even though the file size was huge (400 MB) there was no problem in previewing or printing (it never ate up all my memory). :confused:

So now I have a small file size database that I can’t fully preview and to print I have to do it a few (hundred) pages at a time. :mad:

I wonder if the problem lies in the VB code. Maybe its Access itself. I don’t know. :confused:

If anyone knows a workaround I would appreciate the input.

Thanks.
:)
 
you may not have solved the problem

was sorry to see that no one had come forward with a solution - i have similar problem, but i'm not sure that you've seen full extent of your problem - as you have, we embedded a number of graphic files in the reports (pdf forms converted to bmp so they could be used as wall paper) - the problem is, however, that when memory is eaten up by print commands, access97 would then permanently lose filters associated with the reports - we had to break up printing of 100+ pages of reports to groupings of 20, depending on memory of machines the program was running on - if you've subsequently found solution, i'd love to hear it - thanks - jim
 
No sulutions, but this is my story...
I have inherited a database with 250+ financial advisor profiles (including embedded pictures) and the pictures are just copy & pasted into the form as a new advisor is hired.
I have looked into changing this setup. I found a sample database that loads the picture onto a form by linking not by embedding and after playing with it here is what I have run into:
1. The form loads great but in the reports, when I go to print several advisor bio's, a progress bar comes into view twice for every record (indicating to me that something is working way too hard).
2. The question comes up of "how do I export these bio's to other databases w/pictures (Has to be very portable) or other formats. I commonly do large mailings and need to send simple databases to the print vendor>

So, I too have some questions about if linking is better than embedding and haven't quite yet come to a conclusion.

P.S.
In the sample database report the image controle gets it's value from the picture field (invisible) which stores the link location.
 

Users who are viewing this thread

Back
Top Bottom