Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution in sql views no longer possible
Message
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:
00975826
Views:
48
This message has been marked as the solution to the initial question of the thread.
Doru,

It still works in VFP9 but you have to code it differently:

- The variable lcMacrotest has to be defined before view is created
- The variable lcMacrotest should be precceded by '?' in the view
create sql view lvMacrotest as sele * from macrotest where &?lcMacrotest
>The following worked in VFP 8, but it does not work in VFP 9
>
create table macrotest free (f1 c(10), f2 c(10))
>create database dbmacrotest
>create sql view lvMacrotest as sele * from macrotest where &lcMacrotest
>This was not documented, but it was nice. Macro was stored in the view expression as macro, and when the macro expression in scope changed, requery() expanded it.
>Too bad... :(
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform