error - There is not enough memory to complete operation 
Author Message
 error - There is not enough memory to complete operation

We have recently compiled our system in VFP6 and we are hitting the above
error where in VFP3 we did not.

The line crashing is
COPY TO ARRAY LA_NEWARRAY FOR NLJDTL.NLJHEAD_ID=M.NLJHEAD_ID

The command works ok until the number of records in the table exceeds around
10000 records. But only 2 records match the conditions. There is an index
tag on the field used in the FOR so Rushmore will be activated. What's going
on here? Are all records being pulled into memory even though only 2 are
required?

I can probably put a fix in to select into an array instead of the copy to,
but I find this a bit worrying as there may be other code that will hit the
same problem.

--
__________________________
Bernie Beattie
Financial & Property Software
Phone : 01786 472625
Fax : 01786 471549
Help Desk : 01786 446106



Tue, 23 Jul 2002 03:00:00 GMT
 error - There is not enough memory to complete operation

You can always figure in advance what the max number of records you could
have and use the TOP verb in the select.

--
Cy Welch
Senior Programmer/Analyst
MetSYS Inc

Quote:
> Bernie

> It seems that in COPY TO ARRAY, the command attempts to copy the entire
table to
> the array, then filters out the array "records" which don't match you FOR
clause
> criteria.
> With a largish table this could  attempt to create an array which exceeds
the
> 65,000 element limit for FoxPro arrays.

> In fact I just tested this out and got the same result as you.

> Better to use Select ... into array as you suggest as this appears to
create the
> array
> from the result set.

> However, if you can't be 100% sure that your result set will be less than
the
> FoxPro
> array limitation, wouldn't it be safer to Select ... into cursor?

> Roger




- Show quoted text -

Quote:
> > We have recently compiled our system in VFP6 and we are hitting the
above
> > error where in VFP3 we did not.

> > The line crashing is
> > COPY TO ARRAY LA_NEWARRAY FOR NLJDTL.NLJHEAD_ID=M.NLJHEAD_ID

> > The command works ok until the number of records in the table exceeds
around
> > 10000 records. But only 2 records match the conditions. There is an
index
> > tag on the field used in the FOR so Rushmore will be activated. What's
going
> > on here? Are all records being pulled into memory even though only 2 are
> > required?

> > I can probably put a fix in to select into an array instead of the copy
to,
> > but I find this a bit worrying as there may be other code that will hit
the
> > same problem.

> > --
> > __________________________
> > Bernie Beattie
> > Financial & Property Software
> > Phone : 01786 472625
> > Fax : 01786 471549
> > Help Desk : 01786 446106




Tue, 23 Jul 2002 03:00:00 GMT
 error - There is not enough memory to complete operation
Bernie

It seems that in COPY TO ARRAY, the command attempts to copy the entire table to
the array, then filters out the array "records" which don't match you FOR clause
criteria.
With a largish table this could  attempt to create an array which exceeds the
65,000 element limit for FoxPro arrays.

In fact I just tested this out and got the same result as you.

Better to use Select ... into array as you suggest as this appears to create the
array
from the result set.

However, if you can't be 100% sure that your result set will be less than the
FoxPro
array limitation, wouldn't it be safer to Select ... into cursor?

Roger

Quote:

> We have recently compiled our system in VFP6 and we are hitting the above
> error where in VFP3 we did not.

> The line crashing is
> COPY TO ARRAY LA_NEWARRAY FOR NLJDTL.NLJHEAD_ID=M.NLJHEAD_ID

> The command works ok until the number of records in the table exceeds around
> 10000 records. But only 2 records match the conditions. There is an index
> tag on the field used in the FOR so Rushmore will be activated. What's going
> on here? Are all records being pulled into memory even though only 2 are
> required?

> I can probably put a fix in to select into an array instead of the copy to,
> but I find this a bit worrying as there may be other code that will hit the
> same problem.

> --
> __________________________
> Bernie Beattie
> Financial & Property Software
> Phone : 01786 472625
> Fax : 01786 471549
> Help Desk : 01786 446106




Wed, 24 Jul 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Memory issue (Not enough storage is available to complete this operation )

2. sorry there is not enough memory to complete this operation

3. Not enough memory to complete operation...

4. Error 0x8007000E - Not enough storage is available to complete this operation

5. SQL7: Not enough storage is available to complete this operation

6. Not enough storage to complete this operation

7. Not enough storage is available to complete this operation

8. Not enough storage is available to complete this operation

9. not enough storage is available to complete this operation

10. not enough storage is available to complete this operation

11. Not enough storage is available to complete this operation

12. Not enough memory to complete query


 
Powered by phpBB® Forum Software