Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Too many views
Message
 
 
À
01/05/2001 05:23:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00501886
Message ID:
00501976
Vues:
25
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform