The information in this article applies to:
SYMPTOMSIn a multiuser situation, when you perform tasks that affect the contents of a database (.DBC file), the error "The database must be opened exclusively" is displayed. CAUSE
The command requires exclusive access to the database. Several commands
that create or modify database objects require that the database not be
shared--at design time or run time.
WORKAROUND
If you receive the error "The database must be opened exclusively" at
design time, all developers must close the database before you can proceed.
ISEXCLUSIVE([cTableAlias | nWorkArea | cDatabaseName [, nType]])When the nType parameter has a value of 2, the function returns the exclusive status for a database. The following example code makes sure the database is open exclusively before using the INDEX ON command:
NOTE: The above code uses CLOSE ALL to close all the files so that the
database can be opened but not selected, making the CLOSE DATABASE command
useless. Of course using CLOSE DATABASE ALL might not be helpful if only
one database needs to be closed. Therefore, issue the following code to
select a certain database to close and reopen:
This ensures that the correct database container is selected, closed, and
reopened.
STATUSThis behavior is by design. MORE INFORMATION
If a view or a table contained in a database is open for shared use, the
database is also shared. Therefore, all multiuser applications require that
a database be shared.
CREATE TABLE Additional query words: denied
Keywords : kbnetwork kbprg FxprgMultiuser |
Last Reviewed: August 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |