Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement