Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering Question
Message
From
05/10/2001 07:40:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
04/10/2001 22:35:27
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00564048
Message ID:
00564675
Views:
13
The view is based on a table, or on tables. As to free tables (tables that are not in a database): the view itself has to be stored in a database. The table(s) that participate can be free tables, or part of the database, it seems.

If most of your tables are free tables:

1) You can create a database, just so you have view capabilities.

2) You may want to re-design your strategy: tables that are part of a database have several advantages over "free" tables.

Hilmar.

>Hi Hilmar,
>
>I wanted to try using view after reading your reply, but it seems VFP only create views for database(.dbc) but not for a table(.dbf).. but for some reason I have to use .dbf file, so is it impossible for me to use view in this case?
>
>Jimi
>
>>You already said what was the disadvantage: it is slow. This seems to be some sort of bug with VFP: Rushmore Optimization doesn't seem to be used with grids/filters.
>>
>>The correct thing to do is to use a view. A view is like a query, but updatable (changes made to the cursor can be written back to the original tables).
>>
>>Hilmar.
>>
>>>Thanks Cetin,
>>>
>>>Just wanna know more, what is the disadvantage of using grid with filters?
>>>
>>>Thanks,
>>>Jimi
>>>
>>>
>>>>>hi,
>>>>>
>>>>>Showing data with a grid and set filters to view the wanted records is a very common thing.. i think most people should have tried it..
>>>>>
>>>>>I also have a form to do such thing, but for one of the filter settings, the grid would become VERY slow, each click on the grid takes 3-5 seconds to get focus, but it works just fine with other filters..
>>>>>
>>>>>would anyone please have a look and see if the following filter would make the grid act so strangely slow?
>>>>>
>>>>>select MyTable
>>>>>
>>>>>filter_expr=allt(thisform.myTextbox.value)  && see what the user want to see
>>>>>filter_desc=iif(UsingFirstLang(), "name1", "name2")  && check different field when using different language setting
>>>>>set filter to at(filter_expr, &filter_desc)>0
>>>>>
>>>>>thisform.grdIT03Itemlist.refresh()
>>>>>
>>>>>
>>>>>any idea? Please help~
>>>>>Jimi
>>>>
>>>>Jimmy,
>>>>Filters and grids are not common :) Whenever possible do not use (personal opinion).
>>>>Instead try making Recordsource directly an SQL (needs index on name1 and name2). Then all you would do is a grid.refresh or grid.recordsource=grid.recordsource if not indexed (I don't know why but grid goes blank if not indexed).
>>>>Cetin
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform