ALM Site Administration API Type Library
CreateProject3 Method
Creates a new project and retrieves project properties.
Visual Basic
Public Function CreateProject3( _
   ByVal DomainName As String, _
   ByVal ProjectName As String, _
   ByVal IsTemplate As Boolean, _
   ByVal ProjectType As String, _
   ByVal DbType As Integer, _
   ByVal DbServerName As String, _
   ByVal AdminUser As String, _
   ByVal AdminPassword As String, _
   ByVal TableSpace As String, _
   ByVal TempTableSpace As String, _
   ByVal CreationOptions As Long, _
   ByVal vExtensionNames As Variant _
) As String
The logical group of projects in the ALM database.
The name of the project in the ALM database.
If true, the project is a template.
The project type can be Standard, Template, or a project type created by an extension.

The type of database. Use the following constants or their values:

  • SA_MSSQL_DB_TYPE (value: 2)
  • SA_ORACLE_DB_TYPE (value: 3)
The database server name.
The database administrator user name.
The database administrator password.
Storage on disk of Oracle database tables. If not Oracle, pass empty string ("").
Temporary storage location on disk for Oracle. If not Oracle, pass empty string ("").

One or more of the values:



To specify both ACTIVATE and CREATE_VERSION_CONTROL, OR the options together:



A safe array containing the names of the extensions to enable or a BSTR containing a name of a single extension.

If this Variant is empty, the method behaves like CreateProject2.

Return Type

On success, returns an XML string containing the project properties.

Return Value Details

The properties of the XML return string:

  • PROJECT_ID    -    The ID number of the project.
  • PROJECT_NAME    -    The project name.
  • DESCRIPTION    -    The project description.
  • DOMAIN_ID    -    The domain ID number.
  • DOMAIN_NAME    -    The domain name.
  • DB_NAME    -    The database name.
  • DB_TYPE    -    The database type number: MS SQL (2), Oracle (3).
  • CREATE_FROM_PROJECT    -    The source project of the created project.
  • CREATE_FROM_DOMAIN    -    The source domain of the created project.
  • PHYSICAL_DIRECTORY    -    The physical directory of the project.
  • DB_NATIVE_AUTHENTICATION    -    Indicates if user login is handled by the operating system (MS_SQL Windows Authentication). If 'N', the authentication is handled explicitly using the user name and password.
  • DB_USER    -    The database administrator user name.
  • DB_USER_PASS    -    The database administrator password.
  • DBSERVER_NAME    -    The database server name.
  • DBCONNSTR_FORMAT    -    The database connection string.
  • DB_ENCRYPTED_CONNSTR    -    For internal use.
  • DB_DRIVER_CLASS_NAME    -   The name of the database manager connection class (JDBC driver class). 
  • PR_EXCEPTION_FILE - The pathname of the file that defines errors that the verify process ignores.
  • PROJECT_VERSION    -   The ALM version. 
  • PR_IS_ACTIVE    -    Indicates if the project is active (Y/N).
  • SAQ_IS_ACTIVE    -    Indicates if SEND ALL QUALIFIED is active (Y/N).
  • PR_IS_QPM_AUTO_CALC_ENABLED - Automatic KPI calculation is enabled (Y/N).
  • PR_HAS_VCSDB    -    Indicates if the project includes version control: (Y)es, (N)o, (D)isabled. This field appears only if version control is available.
  • USERS_QUOTA    -    The maximum number of concurrent connections. -1 indicates an unlimited number of connections.
  • PR_LANGUAGE    -    The search language.
  • PROJECT_TYPE - The type of project.
  • IS_TEMPLATE - Indicates whether this is a template project (Y/N).
  • PROJECT_UID - The project ID.
  • PR_SMART_REPOSITORY_ENABLED - One of: NO - not a smart repository; YES - smart repository; PENDING - offline migration completed and waiting for online migration; MIGRATING - online migration in progress.
  • PR_SR_GC_STATUS - Optimized repository garbage collection status.
  • PR_SR_GC_LAST_RUN_TIME - Optimized repository garbage collection last run time.
Return Value Example
<?xml version="1.0"?>
    <DESCRIPTION>Created on 2007-07-02 10:12:30</DESCRIPTION>
       C:\ProgramData\Micro Focus\ALM\Repository\qc\DEFAULT2_26\test2\
Private Sub CreateProject3() 
'The following Visual Basic example creates a 
' new project in an existing domain. 
    Dim sDomainName As String 
    Dim sProjectName As String 
                Dim sProjectType As String 
    Dim sServerName As String 
    Dim CreateOptions As Long 
                Dim vExtensionNames As Variant 
    Dim sReply As String 
    On Error GoTo err 
    sDomainName = "MyNewDomain" 
    sProjectName = "MyNewProject" 
                sProjectType = "Standard" 
    sServerName = "http://myserver/qcbin" 
                vExtensionNames = "ALM_SAMPLE_EXTENSION" 
    CreateOptions = SA_ACTIVATE_NEW_PROJECT 
    sReply = m_SAClient.CreateProject3 _ 
        (sDomainName, sProjectName, SA_ORACLE_DB_TYPE, _ 
        sServerName, "admin", "swordfish", _ 
        "", "", 0, 0, _ 
        CreateOptions, vExtensionNames) 
    MsgBox sReply 
    Exit Sub 
    MsgBox "Program failed:" + err.Description 
End Sub 
See Also