Do not delete the index files.
Open the table exclusively and then DELETE TAG ALL.
>Dear Experts
>
>I have a databsae container which include table1
>I want to make a routine that will first erase all tags and recreate them.
>I wrote following procedure but it displays error messages as
>File in use
>Database is invalid, please validate
>
>set safety off
>erase 'Tables\*.idx'
>erase 'Tables\*.cdx'
>erase 'Tables\*.tmp'
>mydbc='TABLES\data1.dbc'
>if !dbused("MyDbc")
> open database fullpath(mydbc)
> set database to &mydbc
> use table1
> index on sno tag indexsno
> index on country tag indexcon
>endif
>messagebox("Done")
>
____________________________________
Don't Tread on Me
Overthrow the federal government NOW!
____________________________________