Public Sub ReleaseConnections() '------------------------------------------------------------------------ ' This routine disconnects the project and releases the connection ' At each stage, there are commented calls to various properties. ' Under the calls, are the output you would get if you ran the ' property calls. '----------------------------------------------------------------------- On Error Resume Next 'tdc is the global TDConnection object. If tdc Is Nothing Then Exit Sub ' Check status. ' Debug.Print "Before Disconnect: " ' Debug.Print "LoggedIn", """" & tdc.LoggedIn & """" ' Debug.Print "Connected", """" & tdc.Connected & """" ' Debug.Print "ServerName", """" & tdc.ServerName & """" ' Debug.Print "ProjectName", """" & tdc.ProjectName & """" ' Debug.Print "ProjectConnected", """" & tdc.ProjectConnected & """" ' Debug.Print ' Before Disconnect - Output of above calls: ' LoggedIn "True" ' Connected "True" ' ServerName "http://server06:8080/qcbin/wcomsrv.dll" ' ProjectName "ota_doc" ' ProjectConnected "True" ' Disconnect from the project. If tdc.Connected Then tdc.Disconnect End If ' Check status. ' Debug.Print "After Disconnect: " ' Debug.Print "LoggedIn", """" & tdc.LoggedIn & """" ' Debug.Print "Connected", """" & tdc.Connected & """" ' Debug.Print "ServerName", """" & tdc.ServerName & """" ' Debug.Print "ProjectName", """" & tdc.ProjectName & """" ' Debug.Print "ProjectConnected", """" & tdc.ProjectConnected & """" ' Debug.Print ' After Disconnect - Output of above calls: ' LoggedIn "True" ' Connected "True" ' ServerName "http://server06:8080/qcbin/wcomsrv.dll" ' ProjectName "" ' ProjectConnected "False" ' Log off the server. If tdc.LoggedIn Then tdc.Logout End If ' Check status. ' Debug.Print "After Logout: " ' Debug.Print "LoggedIn", """" & tdc.LoggedIn & """" ' Debug.Print "Connected", """" & tdc.Connected & """" ' Debug.Print "ServerName", """" & tdc.ServerName & """" ' Debug.Print "ProjectName", """" & tdc.ProjectName & """" ' Debug.Print "ProjectConnected", """" & tdc.ProjectConnected & """" ' Debug.Print ' After Logout - Output of above calls: ' LoggedIn "False" ' Connected "True" ' ServerName "http://server06:8080/qcbin/wcomsrv.dll" ' ProjectName "" ' ProjectConnected "False" 'Release the TDConnection object. tdc.ReleaseConnection ' Check status. ' Debug.Print "After ReleaseConnection: " ' Debug.Print "LoggedIn", """" & tdc.LoggedIn & """" ' Debug.Print "LoggedIn Error", err.Description ' Debug.Print "Connected", """" & tdc.Connected & """" ' Debug.Print "ServerName", """" & tdc.ServerName & """" ' Debug.Print "ProjectName", """" & tdc.ProjectName & """" ' Debug.Print "ProjectName Error", err.Description ' Debug.Print "ProjectConnected", """" & tdc.ProjectConnected & """" ' Debug.Print "ProjectConnected Error", err.Description ' After ReleaseConnection - Output of above calls: ' LoggedIn Error OTA server is not connected. ' Connected "False" ' ServerName "" ' ProjectName Error OTA server is not connected. ' ProjectConnected Error OTA server is not connected. Set tdc = Nothing End Sub