Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't figure out Error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00184055
Message ID:
00184070
Vues:
20
>
>use generatepk exclusive
>	SCAN
>		REPLACE gpk_currentnumb with 0
>	endscan
>
>I get the error "Variable "GPK_CURRENTNUMB" is not found.
>This field does exist in the generatepk table. I even put a list stru right before the scan command and it shows that gpk_currentn... does exist.

A guess based on your indentation ... are there a lot of commands in your code which you didn't show here? That's OK if you don't want to, but I have a point.

Are you sure a command between SCAN and REPLACE isn't changing you to another work area? REPLACE without IN clause works on the currently SELECTed work area.

Another question, if you *did* show all your code in your question: are you aware that REPLACE takes a scope clause?

You can:
REPLACE field WITH value ALL
(same as:
SCAN
  REPLACE field WITH value
ENDSCAN)
or:
REPLACE field WITH value FOR condition
(same as:
SCAN FOR condition
  REPLACE field WITH value
ENDSCAN
HTH,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform