Assuming this is an untrappable error, you could check for the existance of the cdx with file(), then use low-level file functions to check and reset the byte(s) that indicate that the dbf has an associated cdx for those that are missing. Then reindex them.
>Hi,
>
>I had my application written using vfp5a. However, some of index are often out of synch, so I had to delete the index (CDX) files and do a indexing again. However, when I delete it then index it again in my code, it is working okay, However, when I manually delete it using window explorer, it will give me error when my program open the file and report of invalid *.idx file.
>
> I want to ablities to allow myself and my customer to delete the index file manually, then let it recreate the index file and don't want vfp to prompt me for 'error'. Please advise.
>
>
>Thank
kenweber
GCom2 Solutions
Microsoft Certified Professional