Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to dynamic change filt cond and ordr of remote view
Message
From
11/02/2002 03:19:58
 
 
To
10/02/2002 09:09:52
Max Chen
Yx Software
Shunde, China
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00617483
Message ID:
00618182
Views:
24
Hi!

Just try SQL SELECT for view with parameter like following:

SELECT ... FROM ... WHERE &?lcWhere

(I'm not sur it should be "&?lcWhere" or "?&lcWhere", but seems first option is more appropriate. Just try both and see which will work.)

Then if you get all records, put a string ".T." into the lcWhere variable (parameter for query). When you need filtering, put the filtering expression as a string into the lcWhere. VFP expands macro in the parameter fro query and run query with it.

HTH.

>Hi!
>
>I'm sorry that i my expression is not correct....
>
>My wanted is, change the SQL of a view .
>
>I want to accept condition/order input of user, then change the view
>then simplely requery.
>
>Max.
>
>
>>Hi!
>>
>>I guess yes. Did you tried it on a simple test before implementing something really big? I know for sure that sorting order by index is maintained after requery(). Probably filters are maintained too. However, WHY you want to filter the view, when you can define it as part of the SQL Select statement for view, and just use requery()?
>>
>>>Is it prossible do this before launch requery() again ?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform