Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Too many views
Message
 
 
To
01/05/2001 05:23:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00501886
Message ID:
00501976
Views:
21
Yes your loading time would improve. Wouold a parameterized view work for your?Based on your description of the problem, it looks like the only difference between the views is a filter on the data. Instead of your SQL looking like where State = "TX" in one view and where State = "OK" in another view, change the SQL to look like where State = ?cState. In the form open the view with the NoData clause [or set the NoDataOnLoad property of the cursor to TRUE in the DE]. When you get ready to populate the view with data all you have to do is:

local cState
cState = ThisForm.cboStateCodes.DisplayValue
requery("lv_MyView")
ThisForm.GridControl.Refresh() && or ThisForm.Refresh()

>I have a VFP6.0 app that uses many views for very similar purposes, and I am thinking of merging most into just 1 view.
>
>I have a form that uses Container classes as the screens and each Container class has 1 view behind it.
>
>Most of the screens have a display grid which I could filter using a Select statement and therefore only use 1 view to cater for about 5 container classes.
>
>Can anyone tell if they think this will improve performance?
>
>The other thing is that all the views are opened as the form is opened, the reason for this is that I need to know what information is currently available to access. If I could halve the number of views, it should improve loading time.
>
>Anyone agree? Comments?
>
>Thanks
>Kev
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform