Nadya first you cant prevent if the cdx file doesn't exist what you can do is trap the error and do something e.g. go to the next loop or cancel the whole loop that is up to you.
>>Nadya your SELECT will open the tables if they are not already open so when you get that error the table that the SELECT is open don't have the CDX file associated to them.
>>
>
>Hi Alexandre,
>
>Yes, I understand that :) My question is: how can I prevent this error? What should I do?
>
>>>Hi everybody,
>>>
>>>I select multiple files using Common Dialog Control. Then I do a loop and select from each file to cursor. Once in a while I get a message "Structural CDX is not found" and the program stops. I do not open files explicitly, though SELECT statement does it. What can I do to prevent this error?
>>>
>>>Thanks a lot in advance.
Alexandre Palma
Senior Application Architect