Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Expression as parameter
Message
De
13/10/2000 22:56:50
 
 
À
13/10/2000 12:30:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00428475
Message ID:
00429477
Vues:
12
>>Thank you but it doesn't work for me.
>>I don't want to create view each time, I would like to requery it, so I need
>>parameters.
>
>You need to use both the macro and the ? : &?rExpr = ?rString
>
>You won't have to recreate your view each time.
>
>or even
>CREATE SQL VIEW lvMyView AS SELECT * FROM mytable WHERE &?lcWhere
>Then the WHERE can be whatever you want it to be....
>
>Just make sure the & is in front of the ?

Have you tried this - I get a syntax error if I don't pre-populate lcWhere, regardless of the value for lcWhere, even ".T." - I can't even modify the view definition, getting a Syntax error. It will fire if I pre-populate lcWhere with a string that macro-expands to a simple logical; I can' modify the view properties, or requery it if the pre-populated value goes out-of-scope. It also gets upset if I add clauses after the logical. I can however:

CREATE SQL VIEW lvMyView AS SELECT * FROM mytable WHERE EVAL(?lcWhere)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform