Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterised View
Message
From
21/03/2004 07:58:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00768398
Message ID:
00888276
Views:
13
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform