Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem indexing table-buffered cursor
Message
De
26/03/2007 13:49:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/03/2007 19:41:27
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01208219
Message ID:
01208550
Vues:
28
>Hi Dragan,
>
>>When opening the view the first time, before you set its buffering, and >hopefully before there's any data in it (use ... nodata), create all the >indexes you may need. Then set the buffering and later change order any way you >like.
>>The view with an index reindexes automatically on each requery(), so you don't >need to do anything there.
>
>That's good advice. However, I can think of one situation where there might be a problem.
>
>In my grid class I change the standard header for my own header class which enables double-clicking to reindex the records on column.controlsource. To do this I first need to change the view to row-buffered (if it is table-buffered), then INDEX ON (columnfield) TAG gridTemp (the tag name can be overwritten for every new index). As we don't know what headers are going to be double-clicked in advance (if any), I don't want to waste processing time by creating an index on every column when the view is first opened, just in case it might be used (but probably won't be).
>
>How would I get around this problem? Any advice would be appreciated.

Just create tags on all possible fields (or fields where you expect you may have an order by), and give them names which can be derived from the field names. That way any header can set order appropriately.

The processing time is negligible to user's own speed - unless you're showing tens of thousands of records in a grid.

With tags created in advance, you may experience a bit of slowdown on a requery, but the sorting would be instantaneous, depending mostly on the speed of the video card. With today's machines, you shouldn't worry.

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform