>Hi!
>
>I have a local view. And I want it index it. I put the following code in Form's DataEnvironment Init method:
>
Select <MyView>
>Index on <Field> Tag <TagName> ascending
>
>It worked until today. Now It doesn't work. Maybe I've changed some options in my application but I can't understand what exactly I could change.
>
>CDX file created after indexing has zero length and no indexes present.
>When I do the same from the command window it all works fine.
>
>Maybe anyone knows what is the problem?
As Hilmar said, should be something in the SQL of the view - depending on how you defined that field. Just make sure it's something that has a fixed length, and yields the same length when you USE ... NODATA.
Though, if its width may be changing, you should be getting error 1496 (or something like that) - view definition has changed.
My trick to catch such things was to open the view with NoData, List Structure. Then open it with data, list structure again, and compare. If everything's the same, you should be fine. If not - blame the fields which have different structure.