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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too many variables

Status
Not open for further replies.

kenndot

Programmer
May 15, 2001
316
US
Does anyone know how to get through this error? There's a real helpful section in the MSDN that says I have reached the max number of variables allowed. I figured that...

I read also that I can change the max # allowed in the registry.... is there another way? A way around it maybe?

Thank you.
 
Kendot

What version are you using? Here are the capacities for VFP7 (I believe, its the same for VFP6.0)

Variables and Arrays
Default # of variables 1,024
Maximum # of variables 65,000
Maximum # of arrays 65,000
Maximum # of elements per array 65,000

Try using the MVCOUNT in your config.fpw
MVCOUNT
Sets the maximum number of variables that Visual FoxPro can maintain. This value can range from 128 to 65,000; default is 1024.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike, I looked in the MSDN and found all that and already tried changing the MVCOUNT... didn't work. This is the line that's causing it...

SELECT * FROM TmpData ORDER BY cSite, ddate INTO ARRAY aTmpData

Even though I'm getting the error, the array is still being created. The array does end up being pretty big, however is still within the range allowed (65,000 elements).
 
Kendot,

Just curios, any special reason to use array ? Why not <INTO TABLE> instead ?

I reckon the speed is not the issue here.

TQ
 
Yes there is a reason, the report that is a result of this is built mostly on array manipulation, that's the first building block of it. The speed is not an issue at all here, it works rather quickly, actually.

 
If anyone is interested in the answer... you may already know this, but I didn't and I thought I would share it...
_________
You will get an array with every field in your table and every record. So your FCOUNT() * RECCOUNT() is how many variables you are creating.

Just a reccount() isn't the true number.
_________

I didn't realize that's how you got to the answer of &quot;How many variables are you creating?&quot; When I did this I got over 200,000 which is why I was generating that error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top