Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Dimensions are invalid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00793284
Message ID:
00793796
Vues:
22
David,

>Frankly since arrays are limited to 65k items, I've never really used them to hold large number of items because there was always a risk of hitting that limit, I'll use a cursor instead. I like to stay at least one order of magnitude away from a system limitation to make sure that my code has a higher probability of working through the system lifetime. I can blame that on my engineering background that basically says makes something at least twice as strong as it needs to be.

You're right, I would have rather used a cursor as a RowSourceType and really wanted to. My problem was the cursor must be in the same data session as the combobox. Here's the scenanio.

At design time network traffic was a big concern. My plan was cache tables on the client and perform SQL locally for lookup controls - comboboxes. So I designed a toolbar/session object with methods for loading comboboxes and returning SCATTER NAME recordsets for other objects to use. It manages lookup data requerying on the server "as needed" and it's easy to maintain since all combobox code is centralized. Each combobox class has a method and all methods share the same data. Great, now how do I bind comboboxes to cursors in my lookup class data session? That's how I came to arrays. Passing the combobox object as a parameter of the lookup object method it was easy overcome the data session barrier. The application has 60 comboboxes and could have 10 different data sessions (forms) that use the same data for dropdowns.

My problem has always been the array elment limit. But, after much testing and consideration I concluded the combobox control has a limit regardless of the RowSourceType and it started to show it's limit before reaching the array limit. That was the only reason I reluctantly used the array. For the last four years and five applications later it has been an excellent class. Of coarse, I always have to consider the data size and data growth rates. With the VFP 8.0 bug this is no longer the case. The array limit is hit before the control starts showing it's limit.

>I merely tried to point out that it is a bug that should not affect the acceptable use of a cbo. A cbo should not have more than a couple of tens of items in it. A lst should not have more than a couple of hundreds of items.

I don't agree with you here. My class works fine using RowSourceType=Array with little perform issues up to 6500 records and 5 columns in a dropdown. The computers are two and three year old P4s with 265 memory.

Ok, I could go on and on but I must get back to it. I've been working like mad on a new project prototype. That's where I ran into this bug to begin with.

David, thanks for your thoughts and time. You've pushed me to think about this design more and I believe helped me come up with a design modification to allow me to use cursors. Well you and another four years of development experience. I'll let you know.... Thanks again man.
Heavy Metal Pedal - click with care
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform