Yau,
>Is there a function that forces VFP to update its cdx files since flush only updates table header and not cdx header?
Close the table:
use in TheTableDespite Fabio's loud proclamation of no, he's only talking about seeing the cdx achieving a filesize as far as the O/S is concerned. While the table is open VFP and the O/S is going to have the CDX in cache and/or disk as it needs. Yes, if your machine crashes between time you create the index tag and close the table you will corrupt the index. Also, since the CDX is derived from content of the DBF it is not much of an issue to recreate it.
This is exactly like every other program, If you open a document in a word processor and begin adding to the document if the machine crashes you lose your changes.
Are you experiencing some problem in particular?