memory usage problem

G

Guest

I am using MS access 2003 and Windows XP. I have built a program to collect
data and putting it into a database (with Microsoft Jet 4.0 OLE DB Provider)
periodically. I have a problem that the memory usage will increase
continuously until I close my program. After all of the memory is utilized, I
received a not enough memory warning and my program is stopped. I already set
the “MaxBufferSize†to 512KB but the memory usage is still increases. Does
anyone know why this happen and how to solve it?
 
G

George Nicholson

FWIW:
Are you using code to open objects (connections, databases, recordsets,
queries, tables, etc.)? Are you closing those objects when you're finished
with them? Are you also setting them to Nothing? Technically, VB should do
the last item for you with local objects when a procedure ends, but if you
are having severe memory problems (or have one enormous loop), you should
consider making sure something isn't slipping through the cracks and not
rely on object destruction working to spec. I think its probably safe to say
that most, but not all, VB programmers consider "Set myObject = Nothing" to
be "good practice".)

HTH,
 

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