GetFirstDatabase (NotesDbDirectory - LotusScript®)

Returns the first database on a server (or local computer), using the file type you specify.

Defined in

NotesDbDirectory

Syntax

Set notesDatabase = notesDbDirectory .GetFirstDatabase( fileType% )

Parameters

fileType%

Constant of type Integer. Indicates the kind of database file you want to retrieve from the server.

fileType%

Indicates

DATABASE (1247) for LotusScript®

NOTES_DATABASE (1247) for COM

Any Notes® database (NSF, NSG, or NSH file)

TEMPLATE (1248)

Any Notes® database template (NTF file)

REPLICA_CANDIDATE (1245)

Any Notes® database or template not disabled for replication

TEMPLATE_CANDIDATE (1246)

Any Notes® database or template

Return value

notesDatabase

The first database, of the specified fileType%, located in the directory. The database is closed. To open it, use the Open or OpenIfModified method in NotesDatabase.

Usage

Each time you call this method, the database directory is reset and a new search is conducted. If you're searching for template files, for example, a new call to GetFirstDatabase with the parameter DATABASE (LotusScript®) or NOTES_DATABASE (COM) will start searching the directory from the beginning, this time for database files.

Example