>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.