Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro expansion of view parameter
Message
De
20/07/2003 16:04:41
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Macro expansion of view parameter
Divers
Thread ID:
00811862
Message ID:
00811862
Vues:
41
I need to contstruct a remote view using a variable WHERE clause. The syntax I have used is CREATE SQL VIEW MyView CONNECTION MyConnection AS SELECT * FROM MyTable WHERE &lcFilter. lcFilter could be something like 'MyField1=Value1 AND MyField2=Value2'.

When I USE MyView, I get the error "Connectivity error. Incorrect syntax near '&'." I also get this message if I change the view parameter to &?lcFilter.

If I change the parameter to ?&lcFilter, the error message is "SQL parameter is missing".

I have read on this forum that it is possible to use macro expansion in a view definition, so has anyone any idea what I might be doing wrong? How else can I set the WHERE filter at runtime for remote views? I am using VFP6/7 as a front-end to MSDE for development (SQL7 at client site).

Any help would be appreciated.

Alan Harris-Reid
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform