ALM Site Administration API Type Library 12.50 and later
RestoreProject Method
The domain name.
The project name.

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

The location of the project's repository.
The database name.
The database server name.
The JDBC connection string, for example:
jdbc:inetdae7://stamina:1433?charset=MS1252
Database user password.
Activate the project (Y/N).
Is the project integrated with a version control system (Y/N).
Activate Send All Qualified to send defect emails automatically (Y/N).
The maximum number of concurrent user connections. For no limit, set to -1.
No longer in use. Pass empty string ("").
Description of the project.
Description
Restores an existing project to a domain.
Syntax
Visual Basic
Public Function RestoreProject( _
   ByVal DomainName As String, _
   ByVal ProjectName As String, _
   ByVal DbType As Integer, _
   ByVal PhysicalDirectory As String, _
   ByVal DbName As String, _
   ByVal DbServerName As String, _
   ByVal ConnStr As String, _
   ByVal DbUserPass As String, _
   ByVal PrIsActive As Boolean, _
   ByVal PrHasVcsDb As Boolean, _
   ByVal SaqIsActive As Boolean, _
   ByVal UserQuota As Long, _
   ByVal VmRepository As String, _
   ByVal Description As String _
) As String
Parameters
DomainName
The domain name.
ProjectName
The project name.
DbType

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

  • SA_MSSQL_DB_TYPE (value: 2)
  • SA_ORACLE_DB_TYPE (value: 3)
PhysicalDirectory
The location of the project's repository.
DbName
The database name.
DbServerName
The database server name.
ConnStr
The JDBC connection string, for example:
jdbc:inetdae7://stamina:1433?charset=MS1252
DbUserPass
Database user password.
PrIsActive
Activate the project (Y/N).
PrHasVcsDb
Is the project integrated with a version control system (Y/N).
SaqIsActive
Activate Send All Qualified to send defect emails automatically (Y/N).
UserQuota
The maximum number of concurrent user connections. For no limit, set to -1.
VmRepository
No longer in use. Pass empty string ("").
Description
Description of the project.
Return Type

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

Return Value Details

The properties of the XML return string:

Example
Private Sub RestoreProject() 
'The following Visual Basic example restores a project 
' that was saved in the MyProject subdirectory. 
    Dim sDomainName As String 
    Dim sProjectName As String 
    Dim sServerName As String 
                Dim sPhysicalDirectory As String 
    Dim sReply As String 
    On Error GoTo err 
    sDomainName = "MyDomain" 
    sProjectName = "MyProject" 
                sPhysicalDirectory = "C:\TD_Dir\MYDOMAIN\MyProject" 
    sServerName = "http://myserver/qcbin" 
    sReply = m_SAClient.RestoreProject( _ 
        sDomainName, sProjectName, SA_ORACLE_DB_TYPE, _ 
        sPhysicalDirectory, sProjectName, _ 
        sServerName, "jdbc:inetora:myserver:1521:myserver", _ 
        sUserPassWord, True, True, True, 20, "", _ 
        "New Project1 for testing") 
        
    MsgBox sReply 
    Exit Sub 
err: 
    MsgBox "Program failed:" + err.Description 
End Sub 
See Also

SAapi Object  | SAapi Members