Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using SCAN + LOCATE
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem using SCAN + LOCATE
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01491799
Message ID:
01491799
Vues:
140
Hi

I want to use SCAN command ON table and select other tables and using LOCATE command inside SCAN struct.

I remember having used this kind of structure before, but now it does not scan beyond first record of PED1.dbf

Does LOCATE command interfer on SCAN ?

Please see my code below:
 select ped1
  SCAN

    
 STORE ALLTRIM (PED1.CIDADE) TO codMunicipio
 STORE remSpecChars(codMunicipio) TO codMunicipio      
 select municipios
  LOCATE FOR municipios.cep1_n <= cepMunicipio
 
 DO case
  case NOT FOUND()
  SELECT nao_encontrado  
      APPEND BLANK       
   
   replace nao_encontrado.retorno with municipios.c 
   
   OTHERWISE

   
   SELECT nao_encontrado
   APPEND BLANK
  replace nao_encontrado.retorno with STR(cepMunicipio)
   
  endcase   

   
       ENDSCAN
  
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform