473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Virtual Memory

Ian
I have and Access 97 DB that prints a report that has many pages, sometime
about 800-1000 page, each page contains a colour picture along with text
boxes.

The pictures are displayed on the report but the DB only stores the path to
the picture. On the reports detail sections On Print event I have the code
([ImageFrame].Picture = [ImagePath]). Image path is the field that store the
picture location.

My problem is that when I send this report to the printer, it gets to about
350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance Options.
Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. This
made no difference at all, it still crashes at about page 350 of the Access
report just as it did before the changes.

I tried moving the code to the On Format event, then it flickers the
pictures on the screen for a while as it uses all the virtual memory, then
crashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.
Nov 12 '05 #1
5 3617
On Thu, 19 Feb 2004 23:47:56 -0000, Ian wrote:
...
My problem is that when I send this report to the printer, it gets to about
350 pages, then runs out of virtual memory and closes Access.
...


I've had a similar problem in the past on a much lower number of pages and
solved it by replacing the printer driver with an up-to-date version.

Peter

--
No mails please.
Nov 12 '05 #2
"Peter Doering" wrote
My problem is that when I send this
report to the printer, it gets to about
350 pages, then runs out of virtual
memory and closes Access.
I've had a similar problem in the past on
a much lower number of pages and
solved it by replacing the printer driver
with an up-to-date version.


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.

However, in my own experience in this area, the failures occurred with a lot
less than 350 pictures. Still, both suggestions are worth looking into.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #3


Have you tried monitoring the amount of swapfile in use ?

It may be necessary to defragment your disk(s) in order for swapfiles to be able to grow to the sizes you
specify, and several of our customers have reported that a defrag resolved this problem for them.

There have been reports of memory leaks that may affect some approaches to handling images in Access Reports,
but it's not clear if that is the case here. Windows 9x/Me can be more susceptible to such issues, and
you can use the ‘Resource Meter’ on these platforms to see if you are reaching certain limits.

We've been able to generate reports of 1000+ pages with large images using our own image control (even
on Win9x), so it's certainly possible.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Ian" <ia********@ntlworld.com> wrote:
I have and Access 97 DB that prints a report that has many pages, sometime
about 800-1000 page, each page contains a colour picture along with text
boxes.

The pictures are displayed on the report but the DB only stores the path to
the picture. On the reports detail sections On Print event I have the code
([ImageFrame].Picture = [ImagePath]). Image path is the field that store the
picture location.

My problem is that when I send this report to the printer, it gets to about
350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance Options.
Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. This
made no difference at all, it still crashes at about page 350 of the Access
report just as it did before the changes.

I tried moving the code to the On Format event, then it flickers the
pictures on the screen for a while as it uses all the virtual memory, then
crashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.


Nov 12 '05 #4
Ian
I don't suppose I should be involved with any kind of advertising but I just
tried the DBPix and printed 8,000 pages with pictures without any virtual
memory loss. I still have concerns with portability but would like to say
how much I appreciate your help, both of you.
"Exponent" <ex******@hotmail.com> wrote in message news:4035dbed$1@lala...


Have you tried monitoring the amount of swapfile in use ?

It may be necessary to defragment your disk(s) in order for swapfiles to be able to grow to the sizes you specify, and several of our customers have reported that a defrag resolved this problem for them.
There have been reports of memory leaks that may affect some approaches to handling images in Access Reports, but it's not clear if that is the case here. Windows 9x/Me can be more susceptible to such issues, and you can use the 'Resource Meter' on these platforms to see if you are reaching certain limits.
We've been able to generate reports of 1000+ pages with large images using our own image control (even on Win9x), so it's certainly possible.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Ian" <ia********@ntlworld.com> wrote:
I have and Access 97 DB that prints a report that has many pages, sometimeabout 800-1000 page, each page contains a colour picture along with text
boxes.

The pictures are displayed on the report but the DB only stores the path tothe picture. On the reports detail sections On Print event I have the code([ImageFrame].Picture = [ImagePath]). Image path is the field that store thepicture location.

My problem is that when I send this report to the printer, it gets to about350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance Options.
Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. This
made no difference at all, it still crashes at about page 350 of the Accessreport just as it did before the changes.

I tried moving the code to the On Format event, then it flickers the
pictures on the screen for a while as it uses all the virtual memory, thencrashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.

Nov 12 '05 #5
Here are some steps you must follow to eliminate/reduce the error you
are encountering:

1) Defrag your Hard drive. The temp printer output files Access
generates can be very large when they contain images.

2) Make sure the drive you point your Virtual Memory Manager to has
several hundred MB's of free space.

3) If you are still using Win9x then make sure you reboot before
printing.

4) You must turn off the "Loading Image" dialog via the Registry
solution here:
http://www.mvps.org/access/api/api0038.htm

5) Load the Images into the Image control from the Detail Section's
Print event NOT THE FORMAT EVENT.
If you follow the above steps and your Report still fails then here are
a couple of more solutions:

1) Upgrade to the latest version of Windows at the very least. Better
yet, upgrade to Access 2003 as well.
or
2) Use the PrintOUt method to only print out a limited number of pages
at a time. Repeat as required.
or
3) THis solution seems to look after most of the memory issues. At
runtime convert the Images to Bitmap format prior to loading them into
the Image control. Here is some sample code:
From: Stephen Lebans (St***********@mvps.org)
Subject: Re: Images in Reports
View: Complete Thread (18 articles)
Original Format
Newsgroups: microsoft.public.access.reports
Date: 2002-09-16 18:46:39 PST
Bruce I finally got a chance to test your method last night. It helped
but only with the actual printing and not the Print Preview itself.
I was able to print the failed Report directly to the printer or to a
disk printer file so that's great! Don't get me wrong, it's still a good
thing because at least you can print the report!

Unfortunately Acess still runs out of resources when you page back and
forth through Print Preview.
I plan to spend some time onthis issue shortly.
Here is the code I use to convert any Jpeg, Gif, or Metafile into a BMP.
Rather than using one of my API solutions I have cheated and set a
Reference to Standard OLE Types type library in order to get at the
SAVETODISK method. But no ActiveX controls are required
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Private ctr As Long

ctr = ctr + 1

Select Case ctr
Case 1
Me.Image10.Picture = CreateBitmapFile("C:\A.jpg")

Case 2
Me.Image10.Picture = CreateBitmapFile("C:\b.jpg")

Case 3
Me.Image10.Picture = CreateBitmapFile("C:\c.jpg")
ctr = 0

Case Else
ctr = 0

End Select

End Sub

Private Sub Report_Open(Cancel As Integer)
ctr = 0
End Sub
Private Function CreateBitmapFile(fname As String) As String

Dim obj As Object

Set obj = LoadPicture(fname)
If Not IsNull(obj) Then

SavePicture obj, "C:\SL11-52"
DoEvents
End If
CreateBitmapFile = "C:\SL11-52"
Set obj = Nothing

End Function

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ian" <ia********@ntlworld.com> wrote in message
news:lDzZb.143$8N6.90@newsfe1-win...
I don't suppose I should be involved with any kind of advertising but I just tried the DBPix and printed 8,000 pages with pictures without any virtual memory loss. I still have concerns with portability but would like to say how much I appreciate your help, both of you.
"Exponent" <ex******@hotmail.com> wrote in message news:4035dbed$1@lala...


Have you tried monitoring the amount of swapfile in use ?

It may be necessary to defragment your disk(s) in order for swapfiles to be able to grow to the sizes you
specify, and several of our customers have reported that a defrag
resolved this problem for them.

There have been reports of memory leaks that may affect some
approaches to handling images in Access Reports,
but it's not clear if that is the case here. Windows 9x/Me can be
more susceptible to such issues, and
you can use the 'Resource Meter' on these platforms to see if you
are reaching certain limits.

We've been able to generate reports of 1000+ pages with large images
using our own image control (even
on Win9x), so it's certainly possible.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Ian" <ia********@ntlworld.com> wrote:
I have and Access 97 DB that prints a report that has many pages,
sometimeabout 800-1000 page, each page contains a colour picture along with textboxes.

The pictures are displayed on the report but the DB only stores the path to
the picture. On the reports detail sections On Print event I have
the
code([ImageFrame].Picture = [ImagePath]). Image path is the field that
store
thepicture location.

My problem is that when I send this report to the printer, it gets
to
about350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance
Options.Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. Thismade no difference at all, it still crashes at about page 350 of the
Accessreport just as it did before the changes.

I tried moving the code to the On Format event, then it flickers
thepictures on the screen for a while as it uses all the virtual
memory, thencrashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.



Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luis Pinho | last post by:
Hi, I would like to know is there's any method that can give me the quantity of virtual memory being used my C# application. I search in the System.Diagnostics namespace but the amount of...
3
by: Gregor Wind | last post by:
Hello all, for my image processing application I need a large amount of virtual memory. I read, that it is normaly possible to get 2GB of virtual memory for each process and when you modify the...
10
by: VM | last post by:
How can I limit the use of the PC's virtual memory? I'm running a process that basically takes a txt file and loads it to a datatable. The problem is that the file is over 400,000 lines long (77...
0
by: Rob | last post by:
hi! i am running a aspnet-application on a machine with 1 gb ram. looking into the taskmanager, the aspnet_wp-process is going to use up to 60 megs heap memory and about 55 megs virtual memory....
3
by: jtertin | last post by:
I was wondering how to manage Virtual Memory usage within a VB app. I have a form with a trend on it that takes ~40MB of virtual memory when it is loaded (depending on the amount of data being...
6
by: zissop | last post by:
Hello I have a strange situation with my ASP.Net applications running on Windows 2003 Server x64. As soon as they get instantiated (a visitor hits a page). the virtual memory they allocate goes to...
1
by: Michael Kansky | last post by:
I have a simple windows app written in VB.net. It has IE control on the form. Once IE control gets utilized by navigating to different www pages, Virtual memory used by the application rises and...
0
by: George2 | last post by:
Hello everyone, Sorry that this question is related to another question I posted some time before because I have some new findings and self-analysis. My question is why sometimes from perfmon...
3
by: Adam Clauss | last post by:
We have an application which is fairly network intensive. During some stress testing, we had it setup to open approximately 300-400 TCP connections (outbound connections, we are a TCP client). ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.