Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameterised View
Message
De
20/03/2003 19:41:13
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
 
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:
00768403
Vues:
16
Thanks Sergey.

>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
Répondre
Fil
Voir

Click here to load this message in the networking platform