ALM Site Administration API Type Library
TestConnection Method
Description
Tests a project’s current connection string.
Syntax
| Visual Basic |
|---|
Public Function TestConnection( _ ByVal DomainName As String, _ ByVal ProjectName As String, _ ByVal ConnectString As String _ ) As String |
Parameters
- DomainName
- The domain name.
- ProjectName
- The project name.
- ConnectString
- If a string is specified, it tests the database with the specified connection string. If an empty string is passed, it tests the database with the current connection string.
Return Type
Returns "1" on success.
Example
Private Sub TestConnection() 'The following Visual Basic example tests a projects ' current connection string. Dim sDomainName As String Dim sProjectName As String Dim sReply As String On Error GoTo err sDomainName = "MyDomain" sProjectName = "MyProject" sReply = m_SAClient.TestConnection _ (sDomainName, sProjectName, "") MsgBox sReply Exit Sub err: MsgBox "Program failed:" + err.Description End Sub
See Also

