Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution on parameterized view in VFP 8 don't
Message
De
22/07/2003 06:19:56
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00812113
Message ID:
00812268
Vues:
26
Doru,

what can I do for you? You solved my bigest problem with VFP8.0. I never come to the idea to have the Var not in scope. I was starting to translate all to Cursoradapter where a can ad the &Where into the string. But it was a to much work so I left those applications alone ...

Thank you very much

Agnes
>>>>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'
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform