Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Error 43 : Not enough memory to complete operation

chriscboy (Programmer) (OP)
10 Jan 08 8:40
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 :)
MarciaAkins (Programmer)
10 Jan 08 14:49

Quote:


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
www.TightlineComputers.com

chriscboy (Programmer) (OP)
11 Jan 08 4:52
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.
DSummZZZ (Programmer)
11 Jan 08 11:08
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:
http://www.davesummers.net/foxprolinks.htm

chriscboy (Programmer) (OP)
11 Jan 08 11:47
Dave,

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

Thanks!

DSummZZZ (Programmer)
11 Jan 08 11:52
Interesting...

  -Dave Summers-  
 cheers
Even more Fox stuff at:
http://www.davesummers.net/foxprolinks.htm

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close