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

Combo limitation VFP 5.0a

Status
Not open for further replies.

geralyn

Programmer
Dec 10, 2003
17
0
0
US
NOTE: I originally listed this problem but incorrectly reference VFP 6.0! It is in VFP 5.0a.

I have a combo list box on a form using a single field from table as the rowsource. Client called to complain that the screen was 'freezing'. After two days of looking and testing for every conceivable source I found that if the table used by the combo box had less than 445 records it worked fine. There is no documentation (that I've found) that says there is a limit for a combo box....any comments?
 
Geralyn:

Sounds like a systems (hardware/software) issue for this single client. Can you duplicate it on your development system?

Al

 
Al, I was able to duplicate the problem here in a single user environment with XP HOME. They are a multi-user system and it happens on every computer and they are running various versions of Windows. Each person runs their own executible and only the data and reports and classes reside on the network. By the way, I compiled the application under VFP 6.0 and find that I get a "=getfile" window when I load this form....if I cancel out, it displays the screen with all other data, but with absolutely no data listed in the control which is causing the freeze up in 5.0a. This obviously, confirms that it is this control and data that is causing the problem. Just that vfp 5 and 6 handle the error differently. At any rate, I have done what I needed to do for the short-term so my client can run....I am just curious as to whether anyone knows if this is a known problem or has experienced it.
Thanks!
 
While indicates there was a problem with more than 275 in VFP 3.0, it was supposed to be fixed in 5.0.

Do you have the table indexed on the field you are using? Have you tried recreating this index?

On the other hand, 455 records is still a lot to put into a combobox - I tend to keep it under 100. However, I just tested combobox (dropdown list) with 10,000 data items - 10 characters, and it seems to work just fine in 5.0a (Build 415) i.e.
?VERSION() && "Visual FoxPro 05.00.00.0415 for Windows"

Rick
 
Geralyn

I cannot recreate the problem in VFp5a, VFP6.0 or VFP7.

I use the following and use the resulting table as a rowsource for a combo on a form and I can scroll up and down without freezing. There must something else at play.

create TABLE myTable (number n(10))
y =1000
x = 1
DO WHILE x < y
INSERT INTO myTable (number) VALUES (x)
x = x +1
ENDDO
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Geralyn:

I too think your problem is unrelated to the number of records. I recently added 5000 to a combo with no problem.

But we need to eliminate the size of the table as a probable cause.

Do this delicately to avoid data destruction:

1. Is it feasible for you to DELETE and PACK some records from this table, AFTER you have backed up everything, including DBF, CDX, FPTs? Do this in increments and try to duplicate the &quot;screen freezing&quot;

or

2. Change your ROWSOURCE/CONTROLSOURCE to another smaller table.

Al
 
Al, doing the tests you describe is exactly how I found the problem. Believe me I spent well over two full-time days to pin point the problem, never guessing that I would find what I did. If I deleted just ONE record from the table, doesn't matter which one, it works fine. Add it back, and it freezes...again, I am confident that it has something to do with the size...HAVING SAID THAT, there is an additional issue: The control rowsource changes depending on whether they are in 'display' MODE or 'edit' MODE. Initially they are in display mode and the table will allow display of ANY customer record matching the CONTROL source. If they go into edit mode, they can only pick from Currently VALID customer records.
 
Geralyn

As suggested by myself and another member change your rowsourcetype to an array when your problem was reported to be in VFP6.0. Have you at least tried that suggestion? If you are unfamiliar with how to create an array,please let us know we will help. But when someone that may have encountered a similar situation makes a suggestion, try it, and report your findings and we will work from there. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

Thanks for pointing out that you had that similar experience and directing me back to your original posting. Although I read your suggestion for the array and saw that you said the more records the slower the application ran, I totally missed that you said you experienced the 'freeze', which was actually all I was looking for by posting this, i.e. had anyone experienced it, since I did not find any documentation as to a limitation on combo/list boxes.

 
Thanks for pointing out that you had that similar experience and directing me back to your original posting.

No, I did not encounter that problem (&quot;. But when someone that may have encountered a similar situation makes a suggestion,&quot;). I was merely suggesting that if a member makes a suggestion to help solve your problem, you may want to try the suggestion.

since I did not find any documentation as to a limitation on combo/list boxes.

There doesn't seem to any limitations on a combobox using a table, as I described earlier, when I load 999 records in a combobox with any issues. But I could see for example where you would want to change your design the an array, if for example your recordsource is one field of a table that has 200 field wide, where the size of the able itself might come into play.

I guess at this point I do not see anywhere that you tried any of the suggestions, but rather you are looking for a confirmation that there is a limitation to a combobox list. The only reference that that I ever saw was an issue on VFP3 using more then 275 records on a combobox, but this was resolved with VFP5.0. But this was a memory issue.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top