JAVA/CORBA CLASSES


createFromTemplate method
Example

Creates a new database from an existing database.

Defined in

Database

Syntax

public Database createFromTemplate(String server, String dbfile, boolean inherit)
   throws NotesException

public Database createFromTemplate(String server, String dbfile, boolean inherit, int maxsize)
   throws NotesException

Parameters

String server


String dbfile
boolean inherit
int maxsize

Note This parameter is new with Release 5.


Return value

Database


Usage

If a database with the specified file name already exists, an exception is thrown.

The new database has the design elements and documents of the existing database.

If "Database file is a master template" is set in the current database, the ACL of the new database takes the following entries:


If "Database file is a master template" is not set in the current database, the ACL of the current database is copied to the new database.

If "Database file is a master template" is set in the current database and the new database is on a server, that server is set as the administration server for the new database.

Programs making remote (IIOP) calls to a server can't create or access databases on other servers. In these cases, the server parameter must correspond to the server the program is running on. There are two ways to do this:


Programs running on a workstation can access several different servers in a single program.

Language cross-reference

CreateFromTemplate method in LotusScript NotesDatabase class

FileNewDatabase @command of formula language

Example
See Also