Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing Database's index
Message
De
30/12/1997 03:12:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00068135
Message ID:
00068382
Vues:
27
>>>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
>>BTW using *select sql* is still a better way. Since a dbc includes two indexes named OBJECTTYPE and OBJECTNAME with key str(parentid) for !deleted() there is no need to copy DCX, indexes could be created with index on.
>
>Cetin,
>
>I also think that using SQL is the better way. Right now, I've developed a separate app that does not access the database to perform the backup and recover stuff. I'd still like to include this in the regular application rather than having it as a separate one though. I'm not sure that I follow your last sentence though. I don't see how the indexes are going to get created here.
>
>Steve

Suppose you have main.dbc , .dct .dcx To create a copy when app is running you could use :

select * from main.dbc where !deleted() into table newcopy && .dbf and .fpt created
use newcopy exclusive
index on str(parentid) tag OBJECTTYPE for !deleted()
index on str(parentid) tag OBJECTNAME for !deleted() && .cdx created
use
rename newcopy.dbf to newcopy.dbc
rename newcopy.fpt to newcopy.dct
rename newcopy.cdx to newcopy.dcx && main database is copied to newcopy database
Ç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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform