Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index a view
Message
From
11/08/1997 11:46:59
 
 
To
11/08/1997 11:40:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00043416
Message ID:
00043991
Views:
34
>>>>I have a form woth two grids. The first is based on a table and uses the ingrid control for incremental searching. The user picks a selection from the first grid and the selection becomes the parameter in a parameterized view that the second grid is based on. I would like to have incremental search capablilities in the second grid also, but the only way I know to do this is woth an index. Can't I index the results of a parameterized view? If so how? If not, what is a better way to go about this? Thanks for your help.
>>>>
>>>>Erik
>>>
>>>Hi Erik,
>>>
>>>Yes, you can index a view, just like any other table with INDEX ON...... Be careful about where the index file is stored, however. You may have to delete the file programmatically after the view is unloaded.
>>>
>>>HTH
>>>Barbara
>>
>>
>>Beware of multi-user implications. The view, if created on the fly, will have to have its own unique name so you can access it exclusively to index it. I also advise against containing such a view in a DBC because of possible DBC corruption. I did this once, made the view a part of a DBC and created an index (CDX) on it. The next time I opened the DB, then the view, the DBC crashed and burned. Come to think of it, I think this view may have been based on remote (Oracle) tables. Just use GENDBC.prg in the VFP tools and backup your data before you try any of this out.
>
>I really do need to be concerned about multiuser issues... especially with this form. The way I have handled it thus far is by creating the index on a local drive. Do you see any potential problems with this? If each user is only running one copy of the app, the file can't be accessed by more than one person.
>
>Erik

To my mind, the safest way to handle these kinds of situation is to use cursor instead of view. Cursors are indexable, editable and so on. The only difference that it's not part of dbc, and therefore all multi-user implications are irrelevant.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform