Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
After close databases
Message
From
08/06/2008 08:42:23
 
 
To
07/06/2008 14:20:37
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01322281
Message ID:
01322361
Views:
19
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform