Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameterised View
Message
De
21/03/2004 07:58:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00768398
Message ID:
00888276
Vues:
14
Sergey - Greetings.

Just tried your suggestion (below) in answer to my own question (just posted)
When I try that, I get "syntax error" (using vfp 8 sp1)

suggestions?

Harry

>Try
>cWhere = "invoice.amount > 100.00"
>CREATE SQL VIEW invoice_view ;
>    AS SELECT invoice.* FROM invoice ;
>    WHERE &?cWhere
>
>
>>Hi All,
>>
>> I've included a View as the RecordSource for a Grid in one of my Forms. My question is can I change the WHERE in the View at runtime and then REQUERY the view to reflect the WHERE clause? I know how to create parameterised views.
>>
>>
>>nAmount = 100.00
>>CREATE SQL VIEW invoice_view ;
>>    AS SELECT invoice.* FROM invoice ;
>>    WHERE invoice.amount > ?nAmount
>>
>>
>>But I'd like to do something like:
>>
>>cWhere = "invoice.amount > 100.00"
>>CREATE SQL VIEW invoice_view ;
>>    AS SELECT invoice.* FROM invoice ;
>>    WHERE &cWhere
>>
>>
>>That way I'd be able to set cWhere to anything I want and requery the view. Is this possible?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform