You could sort to a temp table, then use the HelpFileDBF exclusively, zap it, then append from the temp table. My assumption is that you are creating a local help file [HelpFileDBF] for the user since you would have to have exclusive use to HelpFileDBF in order to overwrite it with the SORT command.
>Here's my code where I do a SORT of a table. My CDX files gets lost. I suspect it's my sort that clobbers my INDEX. How can I prevent this? Thanks.
>
>*************************
>* Sort Master Help file *
>*************************
>
>SET SAFETY OFF
>USE (helpfiledbf2) IN 0 SHARED
>SORT TO (helpfiledbf) ON contextid
>SELECT masthelp
>USE
>SET SAFETY ON
>
Mark McCasland
Midlothian, TX USA