Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterised View
Message
From
20/03/2003 19:41:13
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00768398
Message ID:
00768403
Views:
17
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform