E
edward
I have a db with links to images. Because the images are large, I don't
use OLE Objects but rather the technique described at
http://support.microsoft.com/kb/148463/ which is to store the image
path in a text field, put an image frame on the form/report, and use an
event procedure to assign the path field to the picture attribute of
the image control before display/format. For example, in a report using
this image link, I have a Format event procedure which does
Me![Imageframe].picture = me![Imagepath]
Functionally this works. My problems are coming when I try to print
more than the first page or two. I should note that the images are
moderate sized photos and scans, ranging from 1.5MB JPGs to 25MB PNGs.
Access uses humongous amounts of memory to print, humongous even for
Access. I'm printing three records per page, one image in each. To
print the first page, the memory used by Access will from from 10MB to
200MB, then up to 400MB for two pages, then 550MB for three pages
(based on watching Task Manager). Beyond that it usually fails
completely, returning without printing anything after chugging for a
while, but I've also seen it oscillating wildly, going up to 500MB,
down to 8MB, up up up again, etc.. My database only has 33 records at
present, but so far I've been unable to print the last three pages at
all, and sometimes I am only able to print the first three pages.
The poor systems I tried this on only have 1GB of RAM. I suppose I need
to bump it up to a terabyte so Access will have enough ... oh, I
forgot, it's against Access' principles to think it has enough memory.
Sigh.
I set up the db on an XP machine with 1GB of RAM and A97, with the db
and the images on an external HD. Nothing much was running on this
machine, and that's where I got the best results (eight pages). To see
if it would make any difference, I moved it to a system which also has
1GB but has A2002 and lots of applications (about 20) running, and so
correspondingly less available memory. I was hoping that A2002 might
handle the situation better, but no luck, exactly the same results.
You'd think I'd be OK if I just printed one page at a time. But no: to
print page 11, Access has to Format pages 1-10 without printing them.
And this causes problems just like actual printing does.
In short, it looks to me like a classical memory leak and garbage
collection, and that at some point an actual allocation failure takes
place and the print aborts.
Any ideas on how to resolve this? Is there some function I can call at
some event to tell Access to garbage collect?
Edward
use OLE Objects but rather the technique described at
http://support.microsoft.com/kb/148463/ which is to store the image
path in a text field, put an image frame on the form/report, and use an
event procedure to assign the path field to the picture attribute of
the image control before display/format. For example, in a report using
this image link, I have a Format event procedure which does
Me![Imageframe].picture = me![Imagepath]
Functionally this works. My problems are coming when I try to print
more than the first page or two. I should note that the images are
moderate sized photos and scans, ranging from 1.5MB JPGs to 25MB PNGs.
Access uses humongous amounts of memory to print, humongous even for
Access. I'm printing three records per page, one image in each. To
print the first page, the memory used by Access will from from 10MB to
200MB, then up to 400MB for two pages, then 550MB for three pages
(based on watching Task Manager). Beyond that it usually fails
completely, returning without printing anything after chugging for a
while, but I've also seen it oscillating wildly, going up to 500MB,
down to 8MB, up up up again, etc.. My database only has 33 records at
present, but so far I've been unable to print the last three pages at
all, and sometimes I am only able to print the first three pages.
The poor systems I tried this on only have 1GB of RAM. I suppose I need
to bump it up to a terabyte so Access will have enough ... oh, I
forgot, it's against Access' principles to think it has enough memory.
Sigh.
I set up the db on an XP machine with 1GB of RAM and A97, with the db
and the images on an external HD. Nothing much was running on this
machine, and that's where I got the best results (eight pages). To see
if it would make any difference, I moved it to a system which also has
1GB but has A2002 and lots of applications (about 20) running, and so
correspondingly less available memory. I was hoping that A2002 might
handle the situation better, but no luck, exactly the same results.
You'd think I'd be OK if I just printed one page at a time. But no: to
print page 11, Access has to Format pages 1-10 without printing them.
And this causes problems just like actual printing does.
In short, it looks to me like a classical memory leak and garbage
collection, and that at some point an actual allocation failure takes
place and the print aborts.
Any ideas on how to resolve this? Is there some function I can call at
some event to tell Access to garbage collect?
Edward