Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I SET FILTER TO and INDEX ON using that same fil
Message
De
11/06/1999 10:33:47
 
 
À
11/06/1999 10:17:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00228250
Message ID:
00228770
Vues:
15
>>>>>>How do I SET FILTER TO and INDEX ON myfld to temp using that same filter?
>>>>>>I want to do a SET FILTER TO myfld = myvar.
>>>>>>After I SET FILTER, I want to INDEX on one of the
>>>>>>Fld values. When I do that and try to browse, it locks up. Can someone tell me what I am doing wrong? thanks...
>>>>>
>>>>>If you want an index that uses a filter, use the following syntax.
>>>>>
>>>>>INDEX ON CHAR1 TAG CHAR1 FOR CHAR1="somevalue"
>>>>-------
>>>>Hey Erik,
>>>>It works great!.. thanks.. Does this mean I do not have to use
>>>>SET FILTER?
>>>
>>>I guess. I don't ever use filtered indexes...
>>>
>>>
>>>and .. how do I release the INDEX.. I use to release
>>>>by SET FILTER TO... ... :)
>>>
>>>You just set the order to something else, or
>>>
>>>SET ORDER TO
>>>
>>>to set it to nothing.
>>----
>>What do you use? I guess I can use a SELECT..FROM...WHERE.ORDERBY..
>>but I will have problems writing back to the table. When I use a SELECT
>>statement.. ther results are a cursor of that table. If I
>>use CREATE VIEW... then I am using a view and will still have to
>>write back to the table.. the way this table works is.. the user makes
>>changes and just tabs out of the fld to save... in other words.. the user is making changes to a live table..I am simply trying to fix someelse's program
>>and you know how that goes...Of course, I would perfer to use a SELECT
>>statement, but I can not work it out. If I could SELECT on the table
>>and have to results be a filtered part of the table, then that would
>>be great.. ... )
>
>I would personally use a view...
>
>but you don't need the filter to be a part of the index to do what you are trying to do... If you are concerned that SET FILTER is too slow, then you can make sure your filter statement is optimizable. You can use SET FILTER and SET ORDER TO in conjunction to get a filtered, ordered table...
--------
Thanks Eric... I think for what I am trying to do the INDEX.. ON.. FOR...
is my best bet... thanks for your help... :)))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform