>
>Here is my test code.
>
>USE cmi!lv_vendors
>INDEX ON cid TAG primary
>? DBF() && = F5PW000M.TMP
>? CDX(1) && = F5PW000M.CDX
>
>= REQUERY()
>
>? DBF() && = F5PW000Q.CDX
>? cdx(1) && = F5PW000M.CDX
>
>Note the last character of the temp name in the DBF() after the Requery().
There is a workaround which is acceptable.
EverY time you index on a view, do so with the following code:
IF EMPTY(CDX(1))
INDEX ON fexpr TAG tagname
ELSE
INDEX ON fexpr TAG tagname OF (CDX(1))
ENDIF
BUILD YOURSELF A LITTLE FUNCTION TO do this which takes the tagname and index expression as a parameter.
You will still have a non-structural index after the first requery -- but only one cdx file no matter how many times you requrey and build indexs. You won't have to reindex or use idx files...
You will have no signficant disadvantages from the fact that they are non-structural cdx's.
BTW -- the reason this has not been encountered more is that in most applications you can build all your view indexes when you first open the view, and do not need to build additional tags.
Thanks
Gar W. Lipow