>lcTableName = "Test" > >CREATE TABLE Test (PK I) >INDEX ON PK TAG PK >USE >ERASE (FORCEEXT(lcTableName, "CDX")) > >TRY > USE (lcTableName ) >CATCH TO oExp WHEN oEXP.ErrorNo = 1707 > ? "Error No CDX" >ENDTRY > >IF NOT USED(lcTableName) > USE (lcTableName) >ENDIF > >Thank you. I just realized that the problem is not with missing CDX but something to do with the Primary key. Sorry for wasting your time. Back to the drawing board.