LOTUSSCRIPT/COM/OLE CLASSES


Opening a database
Example

The New method for the NotesDatabase class opens an existing database if you specify the file name as the second argument. The New method does not create a database. The first argument specifies the server and defaults (empty string) to the local Domino directory.

The second argument specifies the file name of the database. If you specify an empty string here, you must later use one of the Open methods to open the database. If you are running on a server and opening a database on that server, specify the first argument as an empty string.

Use the CurrentDatabase property of NotesSession to access the current database. The current database does not have to be opened.

To open a database for which you have set an object, for example, using the GetFirstDatabase or GetNextDatabase method of NotesDbDirectory, use the Open method with two empty strings for the arguments.

Use the OpenByReplicaID method to open a database where the server and replica ID are known. You can obtain the replica ID from a database that is already open with the ReplicaID property.

The OpenIfModified method opens a database only if it was modified after a specified date.

The OpenMail method opens the user's mail database.

The OpenWithFailover method opens a database on a server. If the database is not on the server but the server is part of a cluster, this method attempts to open the database on the other servers in the cluster.

The following actions can be performed on a database:


Example
See Also