CreateDatabase

Description

Creates a new database and associates it with the schema repository.

Note: This method is for Windows only.

The new database object does not have any of its properties set. You can set the basic database information (such as timeout intervals, login names, and passwords) by assigning appropriate values to the properties of the returned Database object. You must also call the returned object's SetInitialSchemaRev method to assign a schema to the database. See the "Database Object" for more information on creating databases.

Syntax

VBScript


adminSession.CreateDatabase(databaseName) 

Perl


$adminSession->CreateDatabase(databaseName); 
Identifier
Description
adminSession
The AdminSession object representing the current schema repository access session.
databaseName
A String containing the name you want to give to the new database.
Return value
A Database Object representing the new database.

Examples

VBScript


set adminSession = CreateObject("ClearQuest.AdminSession")
     adminSession.Logon "admin", "admin", "" 

set newDatabaseObj = adminSession.CreateDatabase ("NEWDB")

' set up the database

' ... 

Perl


use CQPerlExt;

#Create an admin session
$adminSession= CQAdminSession::Build();

#Logon as admin
$adminSession->Logon( "admin", "admin", "" );

#Create the database "NEWDB" object
$newDatabaseObj = $adminSession->CreateDatabase( "NEWDB" );

# set up the database

#...

CQAdminSession::Unbuild($adminSession);