>I want to be able to rebuild the CDX when it does not exist.
>
>I know I can open the file and delete TAG, but how do I open the file if the CDX is NOT there. It always gives me an error and it confuses my users.
>
>I want to be able to open the file (with no cdx present) and build the CDX.
>
>HOW DO I STOP THAT ERROR MESSAGE???
You can set up local error handler to intercept error 1707. If your table has a primary key see Message #
538390.
lcSaveOnError = ON("ERROR")
ON ERROR DO LocalOnError WITH ERROR()
USE test EXCL
ON ERROR &lcSaveOnError
...
RETURN
Procedur LocalOnError
Lparameters tnError
IF tnError = 1707
RETRY
ELSE
ENDIF
RETURN
--sb--