Microsoft Operations Manager

GetError Method (TermServer)

The GetErrormethod gets the most recent error description for the TermServerobject.

[VBScript] TermServer.GetError()

Parameters

None

Return Value

String

Examples

The following example shows how to get an error after a function fails.

[VBScript] 
Function GetAccountName(lngSessionID)
	Dim objTermServer, blnOK, strUserName

	Set objTermServer = CreateObject("OpScrUtil.TermServer")

	blnOK = objTermServer.GetUserNameFromSessionID(lngSessionID,
strUserName)
	If (blnOK = False) Then 
		strUserName = "GetUserNameFromSessionID Failed. The error
is " & objTermServer.GetError()
	End If

	Set objTermServer = Nothing

	GetAccountName = strUserName
End Function

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

TermServer Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.