Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can use seek to perform like locate withg dowhile?
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01153661
Message ID:
01153740
Vues:
15
>How can I duplicate the following code using the seek command:
>
> SCAN
> SELECT Invoice
> LOCATE FOR in_code = lnCustCode
>   DO WHILE FOUND()
>     do some code
>     CONTINUE
>   ENDDO
> SELECT sometable
> ENDSCAN
>
>
>The is extremely slow as this codes is already in another loop and therefore a locate for the whole table is execute each time.
>
>Thanks in advance.
 SCAN
 if seek(lnCustCode, "Invoice", "MyOrder")
   select Invoice
   set order to myOrder
  scan while myField = lnCustCode
     do some code
   ENDscan
   endif
 SELECT sometable
 ENDSCAN
I sent you a note by UT private messages.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform