IsOpen (NotesDatabase - JavaScript™)
Read-only. Indicates whether a database is open.
Defined in
NotesDatabaseSyntax
isOpen() : boolean
Legal value | Description |
---|---|
true |
if the database is open |
false |
if the database is not open |
Usage
A database must be open to use theNotesDatabase
methods
except: getCategories
, getDelayUpdates
, getDesignTemplateName
, getFileName
, getFilePath
, isOpen
, isPrivateAddressBook
, isPublicAddressBook
, getParent
, getReplicaID
, getServer
, getSize
, getSizeQuota
, getTemplateName
,
and getTitle
.The following methods do not open
a database: NotesDbDirectory.getFirstDatabase
, NotesDbDirectory.getNextDatabase
,
and NotesSession.getAddressBooks
. You must explicitly
call NotesDatabase.open
.
If a NotesDatabase
object
must be open but is not, the following error occurs: "Database has
not been opened yet." This error does not occur when the NotesDatabase
object
is created, but later when the attempt to use it occurs. Possible
causes of the error are: the database as specified does not exist;
the user does not have permission to access the database; the database
is damaged.
Examples
This button gets the result ofisOpen
before
and after opening a database.function isitopen(db) {
if (db.isOpen()) {
requestScope.status += db.getTitle() + " is open\n";
} else {
requestScope.status += db.getTitle() + " is not open\n";
}
}
var dbdir:NotesDbDirectory = session.getDbDirectory(null);
var db:NotesDatabase = dbdir.getFirstDatabase(NotesDbDirectory.DATABASE);
isitopen(db);
db.open();
isitopen(db);