Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Really large array
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00736201
Message ID:
00736421
Views:
13
>>As others have mentioned, you can set the MVCOUNT to a high enough number, but I'd really recommend another approach since, at this level, just about any array-based operations will crawl (and, if you are calling an object on another server -- either now or in the future -- passing arrays byRef could cause additional performance issues.
>
>You will never be able to accomodate this size array within VFP, as it has a 65,000 element limitation. Changing MVCOUNT has no effect on that limit. So if your array has 10 elements per row, you would be limited to 6,500 rows in the array.
>

Right -- I had read the original post, then the responses, then prepared my own response and forgot his original numbers. That'll teach me to post whne I am not sufficiently caffeinated.

So, to answer his original question, it is a "product limitation," but even if it wasn't, I'd use the technique I mentioned (still copied below).

>
>>
>>Taking another approach may or may not be easy for you (are you in control of the source code/overall design for the called object?). A few folks have mentioned cursors, but since you need to pass the data, this may not be the right solution ... one option is to pass an xml string (but it could be one heck of a long string). Another option is to set up a temporary table that holds the records you need: dump them in from the calling process, the pull them out during the called process. I'd recommend attaching a "callId" field and pass the callId number to the process, and select from the table based on that id... this will allow multiple user access. This table could be a VFP table or whatever kind of database you are using (such as SQL Server).
>>
>>HTH.
>>
>>>I have a program that reads a table and stores the result set in an array using the select ... into array command. That table is roughly 50000 x 10. I get VFP error 22, Too many variables. I am using VFP 7.0 SP1. This program is part of a larger architecture where data is being passed by array. Is there any way for VFP to handle a large array or is this a product limitation? Any help would be appreciated.
>>>
>>>Tom Paterno
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Reply
Map
View

Click here to load this message in the networking platform