Insufficent system resources

  • Thread starter Thread starter Alexander Sinitsin
  • Start date Start date
A

Alexander Sinitsin

Hello, All!

MS Office XP/SP2

I have a procedure, that does a hard work - many rows
selected\inserted\updated in many tables. For all this changes transaction
is used. I don't meet any problems at time of development. But when I move
this procedure on production (tables has a lot of data), I meet this
problem.
When procedure fired, ACCESS use 100% of processor time and constantly
consume memory. After a while ACCESS get approximately 80Mb and return
error - insufficent system resources. But I has at least 300 MB of free RAM
and over 3Gb on hard disk.
DAO 3.6 is used. I check my code twice. Any SET a = ... has appropriate
SET a = Nothing.
What things I can check in my project to prevent memory leaks? Is there
problem with ACCESS itself?

With best regards, Alexander Sinitsin. E-mail: al_sin[dog]ukr.net
 
Alexander,

Silly point but have you closed the recordsets as well as
set to Nothing?

Uncle Sam
 
Hello, Uncle!
You wrote on Thu, 12 Aug 2004 02:21:36 -0700:

US> Alexander,

US> Silly point but have you closed the recordsets as well as set to
US> Nothing?

I think,
Set rst = Nothing
has the same sense as
rst.Close

see Recordset.Close documentation:
"An alternative to the Close method is to set the value of an object
variable to Nothing (Set dbsTemp = Nothing)."

Well, I founnd the reason. I use procedure that add messages to ListBox at
time of processing. When I comment out this procedure, memory leaks
dissappear.

Procedure text:

Private Sub LogMessage(pListBox As ListBox, pMessage As String)

If Not (pListBox Is Nothing) Then
'Handle overfit
If Len(pListBox.RowSource) > 30000 Then pListBox.RowSource = ""
'Add message
pListBox.AddItem pMessage
End If

End Sub


I don't know why this procedure follow to memory consumption.


With best regards, Alexander Sinitsin. E-mail: al_sin[dog]ukr.net
 
in VB a list box has a memory limit or 32k if I remember correctly. This
may be applying here.
 
Hello, Stewart!
You wrote on Fri, 13 Aug 2004 22:25:32 +1000:

ST> in VB a list box has a memory limit or 32k if I remember correctly.
ST> This may be applying here.
Yes, you are right.
This string take care about this:

With best regards, Alexander Sinitsin. E-mail: al_sin[dog]ukr.net
 

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

Back
Top