memory usage problem

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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,
 
Back
Top