Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 43 : Not enough memory to complete operation

Status
Not open for further replies.

chriscboy

Programmer
Apr 23, 2002
150
0
0
GB
Hi,

Our VFP7 database has been working fine for years. Yesterday I was doing some working using the admin function of our database (to allocate reports to users) and when I click on a tab on a form it generated the following error:

"There is not enough memory to complete this operation."

Now I havn't changed the code for a while and the line it falls over on is:

copy to array aUserChoices fields ncrystal_id for nprofile_id = profiles.nprofile_id

This line will at most create an array of 50 items. It has worked fine until now. Any ideas on why this suddenly occur's now ? I have tested on several workstations which are HP 3.2Ghz PCs with 2GB of RAM.

I also tried adding a MVCOUNT=xxx to the config.fpw but that didn't help either.

I can workaround the issue by doing some backend database work, but I am worried this error might crop up in another area of the application which our end users use.

Many thanks in advance :)
 
Our VFP7 database has been working fine for years. Yesterday I was doing some working using the admin function of our database (to allocate reports to users) and when I click on a tab on a form it generated the following error:

"There is not enough memory to complete this operation."

It's known that VFP has sometimes that problem on PC's with 1Gb memory or more and limiting the buffer size fixes it.
You can try to limit the size of VFP buffers.

Code:
SYS(3050, 1, 512*1024*1024)
SYS(3050, 2, 512*1024*1024)

Also try to call SYS(1104) after command that process large tables. It clears memory cache and buffers.


Marcia G. Akins
 
Thanks for the reply.

I tried using the SYS commands but it did not make a difference.

As an experiment I removed the COPY TO ARRAY command, and created the array manually like :

Select profiles_reports
Count To lnProfileCount For nprofile_id = profiles.nprofile_id
If lnProfileCount > 0
Dimension aUserChoices[lnProfileCount]
lnCount=0
Scan For nprofile_id = profiles.nprofile_id
lnCount = lnCount + 1
aUserChoices[lnCount] = profiles_reports.ncrystal_id
EndScan
EndIf

This worked! I have no idea why because it is doing the same job as a COPY TO, just a bit long winded, thats all.
 
Just to satisfy my own curiousity here, did you by chance try using something like?:
Code:
SELECT ncrystal_id ;
   FROM profiles_reports;
   WHERE profiles.nprofile_id = nprofile_id ;
   INTO ARRAY aUserChoices
Did it make a difference?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Dave,

I have just tried your suggestion and that works fine too. As its simpler than my approach, I shall use it.

Thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top