Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem indexing a view
Message
De
09/11/1999 14:29:48
Jill Derickson
Software Specialties
Saipan, CNMI
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00289093
Message ID:
00289185
Vues:
22
>I have a view to input data in a grid of my form.
>I want to let the user change the order of the view by cliking on top of the grid (ex.: on description to get the order by description).
>So after my =requery("my view"), I tried to put some index on my view:
>INDEX ON accnt_no TAG accnt_no and
>INDEX ON descr TAG descr
>
>It failed with "Command cannot be issued on a table with cursors in table buffering mode".
>
>What can I do just to get an index on this ?
>
>Thanks
>Eric

Your view is table buffered, so you cannot use INDEX on it (as the error message says). You need to have the view ROW buffered when you create the index.

I do the following (recently learned this on the UT):

- in the DE, set the view row buffered, no data on load
- in my LOAD method, create the index (you only need to create it once)
- in my INIT method, change the buffer mode of the view to table buffering
- REQUERY as needed

HTH
J
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform