Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make a copy of a DBC during runtime
Message
 
 
To
23/05/2008 20:58:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01319312
Message ID:
01319314
Views:
22
Have you considered closing the database before making a copy? I have a routine in my application that creates ZIP of all data files, including the database (DBC/DBT/DCX). My zip routine would not work unless I close the database. So I do close the database and the ZIP works well. I guess there must be a reason that you keep the database open while needing to make a copy, but maybe you can see a way to close it and sill do the copy.

HTH.

>I need to make a copy of a database (DBC/DBT/DCX) to another directory at runtime.
>
>1) The DBC is OPEN, yet I can copy it fine with Windows Explorer and the copy can be OPEN DATABASE.
>
>2) VFP doesn't allow doing a COPY FILE for all three files because the database is OPEN (in use).
>
>3) I tried USEing AGAIN the DBC as a table and then COPY TO, but the copy is not recognized as a database and cannot be opened. All deleted records are gone from DBC copy but all remaining records are identical. hmmm
>
>4) I then USED AGAIn the DBC as a table, SET DELETED OFF, COPYed TO, (which preserved the records, although not deleted) then deleted appropiate records in copy, but copy is still not recognized as a database grrr
>
>5) I even trid doing a SQL SELECT with deleted off and then deleting the appropiate record, but again no.
>
>What is needed may be to make a Windows copy via some shell, but I don't now how to do this.
>
>Any suggestions?
>
>Alex
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform