Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing SQL results
Message
De
12/09/1997 10:42:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/09/1997 17:23:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00049056
Message ID:
00049839
Vues:
74
>grid to narrow the search. Because of the size of the table that the grid >is based on, SET FILTER takes _forever_. I would like to be able to execute >an SQL query, and change the recordsource of the grid to the resulting >cursor. Issuing the query and changing the recordsource to the cursor are >easy enough, but the indexing is posing a problem, because as far as I >know, you can only index tables and views. Is the only way to do this to >put the results into a table and then use and index the table? If so, where There are two ways out: if you can have the order set to the index you are using for search, you may take a look at the "Set Key To /value/" command - it will immediately narrow the view on your data to only those records having the /value/ in the key field. You can index cursors as well. If you have a read-only cursor, you can place one tag on it without problems. If you need more tags, you can either Use that cursor Again Alias SomethingElse, or index it to a non-structural index file, like this: Select * from original_alias; where condition; into cursor temp1 cdxname_lc=sys(3) index on field1 tag first of (CdxName_lc) index on field2 tag second of (CdxName_lc) .... index on fieldn tag enth of (CdxName_lc) There are two good reasons for using random name for the cdx file. First, network. You may have your temp directory (backslash included) in a tmpdir_gc variable, and do cdxname_lc=TmpDir_gc+sys(3) Second, in case of crash your .cdx may still live on the disk, in the same directory where you left it. If its name is not random, next time you try to index to it, fox will try to open it, and if it's crashed, your app will break.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform