Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Decoupling free tables and indexes from db how?
Message
De
28/05/2007 17:43:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 5
Divers
Thread ID:
01228921
Message ID:
01228926
Vues:
14
>Hi All,
>
>We have a program which main task is to append data every month from three sdf files to three dbf datatables in a database and putting some cdx indexes on it. The program takes an hour, and the program runs manually after the raw data is available in the morning.
>
>We have plans to write three exes that run immediately after each sdf job has finished in the night. So there are three batch jobs(Wiskunde,Basisvrz,Contract) which extract data from an adabas database to an sdf file and after finishing it has to run the belonging foxpro exes. It could be possible that 2 exes have simultaneously access to the database (one exe writes data to wiskunde.dbf and other to basisvrz.dbf for example). For now this gives an access error, which I thought I couldn't solve. Is it possible to solve this?

Is it possible that your exes run under Set Exclusive On? You need to have the exclusive off, in case two of them access the database. However, if you are repopulating some tables, i.e. zapping and filling them, you need to open only those tables exclusively.

>An other solution I thought about is to decouple the dbf files from the database. So each exe returns a free dbf file and a cdx belonging to this file. And in the morning I just could copy these files and overwrite the dbf files in the directory with the database. Could this work? Or are there some pitfalls?

You could create a directory with an exact copy (same names, same everything) of your database and its tables, only with no data and no RI code. Then your exe would populate that table. You can even have a private directory for each exe.

Then in the morning your process could copy the files from these directories and zap the files there, or create the whole temp database(s) from scratch.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform