>In my never ending attempts to perform an on-line backup of the database, the problems seems to be that the index of the database container does not close so it's the "File in use". Any way to get this file to close so that it may be copied? CLOSE ALL, CLOSE DATABASES, CLOSE INDEXES do not seem to shut this down. If I use a SQL command to copy the database, the DCX file does not go with it.
>
>Steve
Hi Steve,
As I remember your DBC changes time to time and need to be copied also. The DBC is reachable exclusive before another user opens it and once opened it's not changed until all users close it. So any user that can open it exclusively could save a copy. Here is a sample scenario :
*Copydbc - call on entry
if file("upgrade.dum")
do while file("upgrade.dum")
wait window nowait "Someone is doing backup process and will be completed in a few seconds"
enddo
wait clear
else
handle=fcreate("upgrade.dum")
if handle > 0
=fputs(handle," ")
=fclose(handle)
use myDBC.dbc exclusive
copy to cpDBC with production
erase upgrade.dum
else
do while file("upgrade.dum")
wait window nowait "Someone is doing backup process and will be completed in a few seconds"
enddo
wait clear
endif
endif