>> My friends suggest me to build index for each column on the cursor. Is it the only way? If the grid box have 12 column, will I build 12 index?
>
>An approach I use is to only add the index tag if necessary when the user clicks on the heading.
It's fairly typical (but certainly not always necessary) to have a tag (permanently in the structural CDX) on every field in a table which you think might ever (a) be used in a FOR clause, or (b) be used to order the table.
If you have a largish table, creating an index "on the fly" (or requerying a view/cursor with a new "order by") will take what the user thinks is a long time. Maybe several minutes (to index) if the table is large enough. But permanent tags in the structural CDX are kept up to date as the data is changed, and setting order to that TAG happens quickly.
HTH,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing