Microsoft Operations Manager

LastError Property

The LastErrorproperty gets the last error encountered by the object.

[VBScript] ActiveDirectory.LastError

Access

Read-only

Return Value

String

Remarks

Beginning in MOM SP1, you should use the error handling provided by the programming language instead of the LastErrorproperty.

Examples

The following example shows how to retrieve an error from the last operation.

[VBScript] 
Function GetADErrorDescription()
	Dim objActiveDirectory
	Dim strError

	strError = ""

	Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")

	If Not(objActiveDirectory.BindPDCMaster()) Then
		strError = objActiveDirectory.LastError
	End If

	Set objActiveDirectory = Nothing

	GetADErrorDescription = strError
End Function

Requirements

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

See Also

ActiveDirectory Object


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