Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution in sql views no longer possible
Message
 
To
12/01/2005 09:20:00
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00975746
Message ID:
00976496
Views:
41
Hi Walter,
I thought '&?' makes it clearer, when you see the SQL, that the variable is a parameter. I also like that in VFP9 you must define the variable before you can create a view, or else you get an error. In VFP8, you could create the view with or without the variable defined (and in scope), but it was stored as a macro only if the variable was not defined - so you had to remember that.
Unfortunatelly this use of macro sub in views is not supported, and not docummented, so I'll try to stay away from using it, because I don't want to have to deal with broken code when going from one version to another.

>Guenter,
>
>It seems that omitting the ? in VFP9 is not supported. Don't ask me why. I'm as stumped as you are.
>
>Walter,
>
>>>>create sql view lvMacrotest as sele * from macrotest where &?lcMacrotest
>>I don't understand why this is this way.
>>- In VFP7 both strategies work (&cWhere and &?cWhere)
>>- In VFP8 only &cWhere works
>>- In VFP9 only &?cWhere weems to work
>><<
>
>>Hey Walter, what is this &? all about? Why would I need a ? after & for macro sub here?
>>Thx
>>G
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform