I haven't checked this out, but could it possibly be opening the database again under a different name since it's already open from the main program? Similar to
Use Sometable
**do some stuff
sele 0
Use newdrive:\somefolder\Sometable
If you open the data window it will show Sometable and the letter corresponding to the work area that it stuck the other sometable. So even though you're closing the database, it's still open as far as VFP is concerned?
>Hi Gang!
>
>My colleague is having a bit of a problem with databases in VFP 8.0 SP1.
>
>This is what he emailed me.....
>
>Here is what is happening:
>
>Database local_lbl is open from pharmmain.prg.
>
>The following code snippet gives me a file in use error on Line 5 (delete database…)
>
>IF FILE("c:\temp\local_lbl.dbc")
> SET DATABASE TO local_lbl
> USE IN SELECT("rx_label")
> CLOSE DATABASE
> DELETE DATABASE c:\temp\local_lbl deletetables
>ENDIF
>
>
>Any clues as to why he is getting this error? I don't see why at this point .....
>
>Thanks in advance!
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place