Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching a view
Message
From
05/08/1998 08:51:12
 
 
To
04/08/1998 21:35:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00123887
Message ID:
00124020
Views:
27
Alan, it's really not necessary to issue INDEX command after each requery, just because index tags will be rebuilt automatically, i.e. it will still take some time to do it (the same as before).

>Glad I could help a little. It's nice to be able to get one in once in a while. I find you kind of have to sneak them in when you're sure everybody else around here has gone to the washroom.
>
>>That is excellent advice. I don't know why I couldn't see that...Duh..I need mental floss. Thanks!
>>
>>>You don't need to build the index on every search. Build the tag(s) once when the view is first opened, and they will remain until you close the view. While the view is still open, you can treat them the same way you do tags on a table.
>>>
>>>>My view is actually a list of people who have registered for a conference (out of all the names which exist in my people table), so it already is filtered somewhat. But after I retrieve the list of all people who have registered for the conference, I wanted to let the user look for the one they want and that is why I thought I needed to index my view based on (e.g.) last name + first name. But I was somewhat concerned about this process (i.e. the indexing) taking too long if it happens every time a user wants to search.
>>>>
>>>>Sylvia
>>>>
>>>>>Yes, if you want to use seek or find on the view you will need to build an index on the fly. However, the real key to using views effectively is that you want to retrieve only the records you need to work with and keep the cursor as small as possible. For example, instead of opening a view that contains all the records in the file and narrowing it down based on the user's input, you would get the key beforehand, then open (or requery) the view.
>>>>>
>>>>>>I was trying to search a view and got an error because the search class I was using couldn't find an 'order'. It was assuming that I had done a SET ORDER TO on a table. That made me realize the view itself didn't have an order, just the underlying tables. I was sort of assuming I could search the view based on the TAGS of those table(s), but since the tables are in different work areas that doesn't seem likely. Is that correct, and do I actually have to create a temporary INDEX ON 'blah' so I can do a search in the view.
>>>>>>
>>>>>>Or am I overlooking an easier way to accomplish the same thing?
>>>>>>
>>>>>>Thanks in advance for the help.
>>>>>>
>>>>>>Sylvia
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform