Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to dynamic change filt cond and ordr of remote view
Message
De
11/02/2002 10:44:48
Max Chen
Yx Software
Shunde, Chine
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00617483
Message ID:
00618346
Vues:
26
Hi

I'm sorry that i can got the remote view work after many time test.

Would you please give me more direction if you got time ?

max.



>One of the cases for sure should work. Just check if you correctly pass expression in the parameter. For exmaple, when you need a query like
>
>SELECT ... FROM ... WHERE MyField like 'something*'
>
>You require to assign following to lcWhere:
>lcWhere = [MyField like 'something*']
>
>HTH.
>
>>Hi
>>
>>There are both not working. Do you have other idea ?
>>
>>max.
>>
>>
>>>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 ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform