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
13/02/2002 12:29:26
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:
00619583
Views:
29
Thanks again.

I will try it.

>Hi!
>
>There is also another solution, but is is not a good one for large number of filter conditions and not good for maintenance (changes). It is also limited in conditions used. You can create a view with query like following:
>
>SELECT * from MyTable
>WHERE (MyField1 = ?lcParam1 OR ?llParam1) AND (MyField2 = ?lcParam2 OR ?llParam2) ...
>Then before requery set up parameters - for filtering conditions that are not included set appropriate llParam* to .T. and lcParam* to empty value. For all other set the value for filtering and llParam* to .F.
>
>>Hi,
>>
>>Your opinion may be the best for my case.
>>
>>Thank u very much !
>>
>>We do want Fox team improve function of view cause it is very
>>important for c/s development, you may get them more suggestion
>>about this as i cann't express myself clearly.
>>
>>max.
>>
>>
>>>Hi!
>>>
>>>OOOPs, Sorry!
>>>
>>>Sure, for remote views this approach will not work.
>>>
>>>You can re-create the view on the fly using Create SQL View command in some database created locally on the local computer (private database needed to do not spoil work for other users that use the same view at the same time). Command like
>>>
>>>create SQl VIEW Sample REMOTE CONNECTION Connect1 AS ;
>>>Select * from MyTable Where &lcParam
>>>
>>>will create the new view or re-create the existing. Then opening it will run different query.
>>>
>>>If you can use SQL Pass-Through commands, better use them in such case, because they allow to run any commands in the string and get a result set. For example, they allow to run stored procedures on SQL Server.
>>>
>>>
>>>
>>>>Hi, Vlad
>>>>
>>>>You can work well with LOCAL view, but does not work with REMOTE view.
>>>>
>>>>What i need is just remote view, do u have any idea about remote view ?
>>>>
>>>>Regards.
>>>>
>>>>max.
Previous
Reply
Map
View

Click here to load this message in the networking platform