>Hi,
> How could we do all of these steps (use table, ignore the error and force to open table) programmatically?
Use an error handler to trap the error. (See ON ERROR). When you USE the table the error handler will fire. In the error handler, you can delete the CDX. You will then need to USE table. The table is not yet open. USE the table and INDEX ON or ALTER TABLE to create the CDX.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer