open (NotesDatabase - JavaScript™)
Opens a database.
Defined in
NotesDatabaseSyntax
open() : boolean
Return value | Description |
---|---|
boolean |
|
Usage
A database must be open to use theNotesDatabase
properties
and methods with some exceptions. Most methods that access a database
open it, but some do not. See isOpen for
details.An error is returned if the user does not have access rights to the database or server.
Examples
This button opens each address book to get its modification date.try {
var books = session.getAddressBooks().iterator();
while (books.hasNext()) {
var book:NotesDatabase = books.next();
if (book.open()) {
requestScope.status += "\"" + book.getTitle() + "\" is open\n";
requestScope.status += "\tmodified: " + book.getLastModified().getLocalTime() + "\n";
} else {
requestScope.status += "\"" + book.getTitle() + "\" failed to open\n";
}
}
} catch(e) {
requestScope.status = e.toString();
}