Memory Problems and Recordsets

geraldcor

Registered User.
Local time
Today, 17:29
Joined
Jan 26, 2004
Messages
145
Hello all,

I have a report that consists of a parent, 5 children and those children have anywhere from 2 to 7 children. This was done so that all of our different reports could be printed on one page for PDF convenience reasons.

The problem. Ever since this report's conception, it has been having memory problems and font initialization error problems.

After searching I have heard mention that leaving the recordset open will cause a memory leak of sorts and cause Access to flip out. I am using DAO. Is it necessary to explicitly close all recordsets that I open or is this an ADO thing?

Anyone have any other thoughts (other than the reports are just huge) as to why I get the error "There is not enough memory to complete the operation. Please close other programs and try again."?

Thanks for any and all suggestions.

Greg
 
I generally associate that error with a printer driver. Do you have the latest drivers?
 
I'm pretty sure I do, but I can check. That's a good suggestion. Would that be giving me the "you have run out of Memory" error?
 
I'm pretty sure I do, but I can check. That's a good suggestion. Would that be giving me the "you have run out of Memory" error?
Yes. You could also try a different printer as a test to see if that make any difference.
 
Hm. Very interesting. I will explore this more.

Any other ideas in case this doesn't work?
 
There was an updated driver for USB printing support under the USB Devices in the computer manager. I will let you know if it works or not.

Greg
 
Well, the upgraded driver seemed to be worse. I can't find any drivers older than the one that is already installed. It is from 2001 (the updated version is from 2003). I'll keep experimenting.

Greg
 
I'm sure Allan is right about the printers; I'm lucky enough not to have run into that one. To address the question about recordsets, yes you should, with either type. See #9:

http://allenbrowne.com/ser-29.html

Generally, any object that is "Set" should be set to nothing.
 
Greg,
What printer are you using? Any others available in your system?
 
Our office is full of HP LaserJet 1020 printers. I will try setting the default to our sharp network printer and see if that helps.

In the allen browne article, it puts the rst = Nothing in an error handler. This confuses me as I wouldn't think this would be called unless there was an error. Can't I just set the rst to nothing when I close the recordset? I mean I trust Allen Browne, I'd just like a little explaination :)

Greg
 
Allen wanted to make sure the object was released in case there was an error. You just don't want to bypass the release the object code.
 
He shows that in the exit handler, not the error handler. The exit handler should always be run.
 
Actually I looked at Allen's code and it is not in the Error handler but the EXIT procedure.
 
Ok. Thanks a lot everyone. Haven't seen much difference in the new printer, but it has been a slow day. I will go through and close every rst in the report (I didn't do the coding for this one so it will be a long, boring process) according to the allen browne article and see what that does. I understand the exit procedure. That makes sense to me now.

I will report back if there is any change.

Thanks again.

Greg
 

Users who are viewing this thread

Back
Top Bottom