getNextDatabase (NotesDbDirectory - JavaScript)

Returns the next database from a server, using the file type specified in the preceding getFirstDatabase method.

Defined in

NotesDbDirectory

Syntax

getNextDatabase() : NotesDatabase
Return value Description
NotesDatabase The next database located in the directory, or null if there are no more.

Usage

The returned database is closed. If you do not open the database, only a subset of its methods are available. See isOpen in Database.

This method must be preceded in the code by getFirstDatabase.

Examples

This data binding for a list box displays the names of all the databases in the current directory.
var out = "";
var dir = session.getDbDirectory("");
var db = dir.getFirstDatabase(NotesDbDirectory.DATABASE);
while (db != null) {
	out = out + db.getFileName() + "\n";
	db = dir.getNextDatabase();
	db.recycle();
	db = tmpdb;
}
return out