Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable error
Message
From
15/07/2008 12:16:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01331418
Message ID:
01331422
Views:
9
>hi all
>I have the following code that is giving a variable not found error on line 2
>
>SELECT tempsorders
>SUM ordqty TO mhistory FOR period > (mperiod-12) AND stkref = mstkref AND stage > "20"
>
>tempsorders contains all of the fields in the sum line and all are named correctly, any ideas?
>~M

Re-check each and every part that may be a field or variable (VFP doesn't know what it is supposed to be, of course).

Divide the command into simpler parts, to identify the error. This may help find the culprit. For example, run the following commands one after the other, from the command line:
SUM ordqty
SUM ordqty TO mhistory
SUM ordqty TO mhistory FOR period > (mperiod-12)
SUM ordqty TO mhistory FOR period > (mperiod-12) AND stkref = mstkref
SUM ordqty TO mhistory FOR period > (mperiod-12) AND stkref = mstkref AND stage > "20"
This should narrow your search for the offending part.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform