Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution in sql views no longer possible
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00975746
Message ID:
00976581
Vues:
47
Hi Jim,
I read it in message #921849.
Comming from a VFPT member, I guess you may say that it is a documented not documented?

>Hi Doru,
>
>Where did you read that "this use of macro sub in views is not supported..."?
>
>If you are surmising this because it's not documented, then you probably should stay completely away from macro substitution altogether, because I can't recollect a single command or function documented as 'supports' (or not) macro substitution. I admit that my reading about views is small and long ago.
>
>Jim
>
> >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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform