>Hi Doug !
>One question. Because VFP database is file system database it seems possible to recreate index file just in such steps:
>a) deleting corupted index file
>b) copying index file from pattern database (empty database that can be stored for example in application file) to directory with live database
>c) reindexing ( through REINDEX command)
>It seems also that in similar way we can treat tables. Is something wrong in such method - using pattern database (not code) as a source of proper database structure ?
Yep - there's no mechanism to support the creation of a delta and apply it; SDT will handle changes in structure, including addition/deletion/alteration of free tables, DBC contained tables, index tags, views, and lots more. You can't manage that without some form of metadata and some way to detect the delta as a change rather than an error. Plus SDT extends the DBC architecture to allow for a range of enhanced functions.
REINDEX does not result in defragmentation of the CDX or full regeneration.
The use of patterns does nothing to help detect corruption of header data.