LOTUSSCRIPT/COM/OLE CLASSES


CreateCopy method
Example

Creates an empty copy of the current database.

Defined in

NotesDatabase

Syntax

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

Parameters

newServer$


newDbFile$
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 occurs.

The copy contains the design elements of the current database, an identical access control list, and an identical title. It does not contain any documents.

The copy is not a replica.

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 where the script is running. There are two ways that this can happen:


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

The ACL of the original database gets copied to the new database, but you may want to modify the copy ACL. For example, you may want Manager access to the copy for yourself even if you're not a manager of the original. Use the methods GrantAccess and RevokeAccess to modify the copy's ACL.

If the database property "Database is a template" is checked, the source is treated as a template instead of a database, and the method acts like the CreateFromTemplate method.

Language cross-reference

createCopy method in Java Database class

@Command([FileDatabaseCopy]) function in formula language

Example
See Also