>Hi All,
>
>sgctempPath="c\windows\TEMP\"
>
>IF FILE(sgctempPath+"LasTemp.DBC")
> SET DATABASE TO sgctempPath+"LasTemp"
> CLOSE DATABASE
> DELETE DATABASE sgctempPath+"LasTemp" DELETETABLES
>ENDIF
>
>Even though I try to close the database it is still open
>DBUSED(sgctempPath+"LasTemp") is .T.,
>
>The problem goes away when I close VFP, coming back and
>run the same code does not produce any problem. The same problem
>occurs with a table
>
>IF USED(tcAlias)
> SELECT (tcAlias)
> USE
>ENDIF
>
>DELETE FILE (sgctempPath+tcAlias+".dbf")
>
>I am getting an error message that file is in use.
>
>Any ideas ?
>
>Thanks
>
>Doron
Is there another data session with the database or table open?
That would be the first thing I'd check.
Insanity: Doing the same thing over and over and expecting different results.