John,
To prevent the overwrite question, set safety off:
local lcOldSafety
lcOldSafety = set("safety")
set safety off
index on ...
set safety &lcOldSafety
>Hi,
> I have a cursor in my search form (private datasession), and I index it using INDEX ON ... OF .CDX
>I faced problem that, VFP keep asking me "myindex exist, overwirte?" even though I have close my search form with CLOSE TABLE ALL in unload().
>I tried to ERAS the CDX file when INIT(). It work sometime, but sometime it will return "file access is denied".
>
>How do tell VFP to close/delete the temp CDX after I release my searc form?
>BTW, I am using Macro for my SQL.
>
>Thank you
Steve Gibson