LOTUSSCRIPT/COM/OLE CLASSES


CreateFromTemplate method
Example

Creates a new database from an existing database.

Defined in

NotesDatabase

Syntax

Set notesDatabaseNew = notesDatabase.CreateFromTemplate( newServer$, newDbFile$, inheritFlag [, maxsize% ] )

Parameters

newServer$


newDbFile$
inheritFlag
maxsize%

Note This parameter is new with Release 5.


Return value

notesDatabaseNew


Usage

If a database with the specified file name already exists on the newServer$, an error is raised.

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 is 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.

Scripts running on a server can't create or access databases on other servers. Therefore, if the script runs on a server, the newServer$ parameter must correspond to the server the script is running on. There are two ways to do this:


Scripts running on a workstation can access several different servers in a single script.

Language cross-reference

createFromTemplate method in Java Database class

@Command([FileNewDatabase]) function in formula language

Example
See Also