Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing Database's index
Message
From
29/12/1997 05:15:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00068135
Message ID:
00068198
Views:
39
>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 && (extensions would be dbf, fpt, cdx)
      erase upgrade.dum
   else   && Someone did it (assuming no extra causes would happen)
     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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform