Need help with System Resource error?

PaulSpell

Registered User.
Local time
Today, 12:35
Joined
Apr 19, 2002
Messages
201
Hello, could someone please offer some suggestions as to how I can fix a problem I have with Access 2010?

I have written some code to pull data from tables on various web pages. The code iterates through several thousand pages and pulls data from each one. Everything works fine when I run this on Access 2010 under Windows 7, but on Windows XP (on a more powerful machine) I get an error saying "System Resource Exceeded".

There are no complex queries involved and no memory leakage that I can see.

I've tried installing the patch from http://support.microsoft.com/kb/2760394 but that doesn't seem to work.

Does anyone have any ideas about how I can fix this? Grateful for any suggestions.

Thanks
 
Dennis Wi - Microsoft(MSFT) said:
Hi Ken,
With 32-bit applications, Out Of Memory issues can occur if you exhaust the 2 GB of virtual memory available to the process, or if memory becomes fragmented to the point that we don’t have a block of contiguous memory large enough to service the request.
It is possible that differences in the operating systems may consume slightly different amounts of virtual memory, so if your delete operations were near the 2 GB limit in Windows XP you may have exhausted the memory or don't have a contiguous block of memory in Windows 7.
The available options would be:
1. Add the indexes you mention to prevent loading so much data into memory
2. Use SQL Server instead of Access as your database engine
3. Use a 64 bit version of Access 2010 because a 64 bit application is able to work with up to 8TB of virtual memory
Regards,
Dennis

This post may help you, can be found here:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/thread/89d0b01c-2b6c-4875-bdac-7cb4f6de3a53/
 
Thanks for the reply but that post referes to a Win 7 problem. My code runs perfectly under Win7, but the problem occurs in XP.
 
It may be due to a difference between 64 and 32 bit operating systems

Check your code to see if you have any API's declared. If so adding PtrSafe should solve the problem

'APIs
Declare PtrSafe Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nsize As Long) As Long
 
It may be due to a difference between 64 and 32 bit operating systems

Check your code to see if you have any API's declared. If so adding PtrSafe should solve the problem

'APIs
Declare PtrSafe Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nsize As Long) As Long

Thanks for the reply. There are no API calls though. The code uses mainly HTML Objects container.
 
Thanks for the reply but that post referes to a Win 7 problem. My code runs perfectly under Win7, but the problem occurs in XP.
It doesn't matter, the important part is:
With 32-bit applications, Out Of Memory issues can occur if you exhaust the 2 GB of virtual memory available to the process, or if memory becomes fragmented to the point that we don’t have a block of contiguous memory large enough to service the request.
Are you running on 32 bit?
 
Yes its 32bit. I read the part that you quoted and I guess that might be the case if there is some memory leakage with Access itself (the code is fine).

In any event, isn't PtrSafe only for use with API's? If not how do I use it with my functions?
 
So far as i am aware PtrSafe only applies to API's.

I develop on both 32bit and 64bit systems and deploy across both as well. So far I have found it is the only cooding I have to do change - everything else seems to work OK
 
Anyone else have any ideas?

I may try and change the record lock limit to see if that makes any difference.
 

Users who are viewing this thread

Back
Top Bottom