Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
After close databases
Message
De
08/06/2008 08:42:23
 
 
À
07/06/2008 14:20:37
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
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 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01322281
Message ID:
01322361
Vues:
20
>As I follow the suggestion from you to have statement OPEN DATABASE XXX at the end of the routine, I still can not run a statement =requery("AView").
>
>I ask is that normally what should I do after a CLOSE DATABASES ALL statement.

Well, you need to open database to make your zap/pack etc.

You have three stages:
1. app is running, DBC is open shared
2. maintainance, need exclusie DBC access
3. app should run again, DBC must be open shared

So you two times close all databases and reopen them, first when entering the maintainance stage and then again when you reenter the normal application running stage.

you can eg remember which database was open by lcDBC=DBC()
then
CLOSE DATABASES
OPEN DATABASE (lcDBC) EXCLUSIVE
and after you're done with your exclusive access again
CLOSE DATABASES
OPEN DATABASE (lcDBC) SHARED
You can't switch from SHARED to EXCLUSIVE nor from EXCLUSIVE to SHARED access, you always need to close and reopen.

Bye, Olaf.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform