Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem using SCAN + LOCATE
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem using SCAN + LOCATE
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01491799
Message ID:
01491799
Views:
138
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
  
Next
Reply
Map
View

Click here to load this message in the networking platform