Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution on parameterized view in VFP 8 don't
Message
From
23/07/2003 04:45:20
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00812113
Message ID:
00812681
Views:
23
Wow ¡¡ Thanks Doru. It wasn't easy to think in this option.

>>>>We have worked in previous VFP versions with macro sustitution in parametrized views as:
>>>>create sql view ... as select ... where &?mycondition ...
>>>>This is not working on VFP 8. Have we losed it forever?

>>
>>>Try it without the question mark
>>
>create sql view ... as select ... where &mycondition
>>
>>That isn't the point, Alex: if he does it that way, he creates the view statically. If he includes the parameter marker, he can substitute the condition at runtime.
>
>Actually, if mycondition variable is not in scope at the time of the view creation, the view is not static. The macro will expand at execution time, so it will act like a parameterized view, i.e.
>
>mycondition = [title = 'ABC']
>use mydbc!myview
>* all recs with title='ABC'
>
>mycondition = [author = 'XYZ']
>requery()
>* all recs with title='ABC'
Saludos,
A.G.P.
---------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform