Visual Basic |
---|
Public Function SetProjectProperty( _ ByVal DomainName As String, _ ByVal ProjectName As String, _ ByVal PropertyNumber As Long, _ ByVal PropertyValue As String _ ) As String |
- DomainName
- The domain name.
- ProjectName
- The project name.
- PropertyNumber
The property number you wish to change. You can use the following constants or their values:
- SA_PROJECT_DB_CONNECT_STRING (value: 1)
- SA_PROJECT_DB_USER_PASSWORD (value: 2)
- SA_PROJECT_ACTIVE (value: 3)
- SA_PROJECT_NAME (value: 4)
- SA_PROJECT_SEND_ALL_QUALIFIED (value: 5)
- SA_PROJECT_USER_QUOTA (value: 6)
- SA_PROJECT_DESCRIPTION (value: 7)
- PropertyValue
The property value.
On success, returns an XML string containing the project properties.
The project must be deactivated in order to change the following properties: SA_PROJECT_DB_CONNECT_STRING, SA_PROJECT_NAME.
Property SA_PROJECT_DB_USER_PASSWORD applies to Oracle databases only.
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.
Private Sub SetProjectProperty() 'The following Visual Basic example sets the property ' for a project name. 'The project is deactivated, renamed, and ' then reactivated. Dim sDomainName As String Dim sProjectName As String Dim sReply As String On Error GoTo err sDomainName = "MyDomain" sProjectName = "MyProject" sReply = m_SAClient.DeactivateProject _ (sDomainName, sProjectName) sReply = m_SAClient.SetProjectProperty _ (sDomainName, sProjectName, _ SA_PROJECT_NAME, "YourProject") MsgBox sReply sReply = m_SAClient.ActivateProject _ (sDomainName, "YourProject") Exit Sub err: MsgBox "Program failed:" + err.Description End Sub