Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Losing a declared variable
Message
From
01/08/2003 12:10:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00815914
Message ID:
00815920
Views:
10
>I have a strange problem with a variable that I have created.
>The variable "thisyear" is a public variable.
>Each time I reference a certain table as demonstrated below, I lose the variable as demonstrated in the following piece of code.
>
>
>SELECT VILLAS
>* -- the variable value is numeric ( 2003 )
>=messagebox(vartype(thisyear),16,"villas")
>
>
>SELECT V_CODE
>set filter to
>set order to
>* -- the variable is lost now logical
>=messagebox(vartype(thisyear),16,"v_code")
>
>SELECT V_season
>SET FILTER TO
>* -- the variable value goes back to numeric ( 2003 ) again
>=messagebox(vartype(thisyear),16,"V99seas")
>
>
>v_code table was filtered at one point on the variable thisyear but even after releasing the filter I still have the same problem.
>What is causing this ?
>How can I work around it ?
>
>thanks in advance

Maybe your cuurent alias has a field named thisyear. Preceed with m.
PS: Public vars are not recommended.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform