General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>I have a DBC open and try to close it in the following way but it remains open:
>
>tcDBCName = 'c:\path\Name.dbc' && CURDIR() is not c:\path
>* Note: the DBC is open
>IF DBUsed(JustStem(tcDBCName))
> SET DATABASE TO (JustStem(tcDBCName))
> CLOSE DATABASES
>ENDIF
>DELETE FILE ForceExt(tcDBCName,'DBC') && Error ocurrs because file is in use
>DELETE FILE ForceExt(tcDBCName,'DCT')
>DELETE FILE ForceExt(tcDBCName,'DCX')
>
>Thanks, Alex
I would presume it is because you SET DATABASE TO,
It will be closed, though the SET command will still have a reference to the file.
CLOSE DATABASES should close all tables and databases, not just the current one.
Try
SET DATABASE TO
when closing, (aswell as CLOSE DATABASES)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only