Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View vs Cursor
Message
De
02/10/2000 16:57:36
 
 
À
02/10/2000 16:41:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00423633
Message ID:
00423760
Vues:
13
>>>>>Yes.
>>>>>Also you can create a index for a view.
>>>>
>>>>Can you create an index for a view from the View Designer?
>>>
>>>No. It has to be created once the view is USEd.
>>
>>Ah Ha! so I can do an INDEX ON ... in the form.init after loading the tables and views to create indexes...
>>
>>
>>Thanks
>
>Yep. And it cleans up after itself when the view is closed. Which means that as long as USED("v_view")=.T. then the index will persist, but if you ever close the view, you'll have to recreate the index.
>FWIW - you may not need this in this case, but if the view is table buffered, you can't create the index. You can set it to row buffering, create the index, then set table buffering back on e.g.
>** assuming we already know the view is table buffered
>SELECT v_view
>CURSORSETPROP("Buffering", 3)
>INDEX ON field TAG tag
>CURSORSETPROP("Buffering", 5)


Thanks for the info....

If I open the view in the DE can I assume that the view is always open if I don't close it in code or should I do a USED("v_view")=.T. before using the index?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform