Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View vs Cursor
Message
From
02/10/2000 16:57:36
 
 
To
02/10/2000 16:41:11
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00423633
Message ID:
00423760
Views:
14
>>>>>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform