>>>>As I wrote, I NEVER use IDX, I ALWAYS use cdx. I suggest that you do the same. I see no reason to use idx, since cdx is faster AND supported during transactions. I think you should see this lack of support for IDX as a clear hint!
>>>
>>>I use .idx indexes because users have needs to sort data by custom columns in table.
>>
>>For your information, the Visual Extend framework, which I use, does more or less the same - when a user double-clicks on a grid column, the framework first checks whether an index with that index expression exists. If it doesn't exist, a temporary index is created.
>
>Right, but this index is deleted when the form is closed. At least that's what my grid class does (code is based on Vlad Grynshyshyn idea).
If I understand correctly, Tore is suggesting to use CDX instead (NOT necessarily the structural CDX - I mention this since I tend to confuse those terms).
Of course, the framework I use (Visual Extend) already does its stuff with IDX files, and it would be too much trouble to change that. The only problem with this approach is that under certain circumstances (mainly, when saving a record), the framework closes temporary indices automatically, and if the user wants to keep a certain sort order, the index has to be re-built, which is a waste of time.
And in other cases, when I do transactions myself, I have to invoke a certain framework method that closes temporary indices (in all open forms!) - or else.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)