REFERENCE
The following statements operate on the specified database. If the database doesn't exist, a new database is created using template [database template name]. If the keepopen option is specified (which is the string "-keepopen"), the database is not closed and reopened if it is already open.
Syntax
ChangeTo [database name] [database template name] [-keepopen]
Where:
Using changeto to create a local database.
* Create local file using the journal template (journal.ntf)
* NOTES.INI contains setting templateversion=4
changeto journal.nsf journal[templateversion].ntf -KeepOpen
pause 5000
* Populate the view with 10 notes
populate 10
* Open the view collection
open
* Update the view index
index
* Close the view collection
close
Example 2
Using changeto to create multiple databases on a server. In this example the thread number is substituted in for the [#] symbol.
* Create one or more databases on Mailserver using (journal.ntf)
* Creation of multiple databases, based on the number of threads
* All test databases will be placed in the journal directory
changeto [MailServer]!!journals\journal[#].nsf journal[templateversion].ntf -KeepOpen
* Populate the view with 10 documents
Example 3
Create and initialize mail file(s)
Note Uses Script Variable [NumMailNotesPerUser]
* Script to create and initialize mail file(s)
changeto [MailServer]!!mail\mail[#].nsf mail60.ntf
* Make sure there are enough notes in mail database
populate [NumMailNotesPerUser] $Inbox
* Open the current view
* Close the view
drop
Related topics