Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lightning FAST!
Message
De
06/02/2007 01:12:22
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01192018
Message ID:
01192670
Vues:
22
>Hi Gang!
>
>One last question today.
>
>In setting up a form for some reports, there is a field called CLASS in a table PSE_drug
>
>I have an index set on class which is simply CLASS.
>
>Now, when I open the PSE_drug table and issue the command
>
>SELECT DISTINCT class FROM PSE_drug INTO CURSOR class
>
>it takes less than a second to get the cursor from a table of 5 MILLION records!
>
>
>WOW
>
>Yet, when I set this up as the ROWSOURCE with ROWSOURCE TYPE = 3 (SQL STATEMENT), it immediately turns into a dog and takes about 70 seconds to populate the control... sigh.
>
>When I get back out of the program, and issue the same commands as before (up above) in the command window, as before, it is now a dog and takes about 30 seconds to populate.
>
>So, any ideas? Thanks!

why not use the addlistitem method ?

something like
SELECT DISTINCT class FROM PSE_drug INTO CURSOR class
object.clear
select class
scan
object.addlistitem(class.class)
endscan
object.listindex = 1
use in select('class')

and see how much time it takes ??
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform