Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






CreateFromTemplate method

Creates a new database from an existing database.

Defined in

NotesDatabase

Syntax

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

Parameters

newServer$

String. The name of the server where the new database resides. Use an empty string ("") to create a database on the current computer.

newDbFile$

String. The file name of the new database.

inheritFlag

Boolean. Specify True if you want the new database to inherit future design changes from the template; otherwise, specify False.

maxsize%

Note This parameter is new with Release 5.

Integer. Optional. The maximum size (in gigabytes) that you would like to assign to the new database. This parameter applies only to Release 4 databases or those created on a server that has not been upgraded to Release 5. Entering an integer greater than 4 generates a run-time error that reads "Maximum size for database is 4 (gigabytes)," and the script fails.

Return value

notesDatabaseNew

NotesDatabase. The new database, which contains the forms, subforms, fields, views, folders, navigators, agents, and documents of the template.

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.

Caution The method does not wait for the new database to be completely copied before finishing. Therefore, if you are copying a large database, use Sleep to ensure that sufficient time is given for the copy to complete before using the new 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.

Language cross-reference

createFromTemplate method in Java Database class

@Command([FileNewDatabase]) function in formula language

See examples

Examples: CreateFromTemplate method
Related topics
Creating and deleting a database




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009