JAVA/CORBA CLASSES
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
Note This parameter is new with Release 5.
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.
The template is a Notes database with the "Database is a template" property checked. If the database property is not checked, the source is treated as a database instead of a template, and the method acts like the createCopy method.
If the source is a template, entries in the template ACL enclosed in brackets are copied to the new database with the brackets dropped. For example, [-Default-] in the template becomes -Default- in the new database. Entries not enclosed in brackets are not copied. In addition, the effective user name is added to the ACL with manager access. If the database is on a server, the server name is added to the ACL with manager access.
Programs running on a server or 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:
If the current database is not a template, the createFromTemplate method creates a new, blank database without any forms or views (equivalent to the create method).
Language cross-reference
CreateFromTemplate method in LotusScript NotesDatabase class
FileNewDatabase @command of formula language
Example See Also