IsError / LastError |
Top Previous Next |
Object: EHL7.QSXML FileName: EHL7.dll
These two properties go hand in hand
PROPERTY
Name: IsError DataType: Boolean Mode: Readonly Description: Returns the error state of the object
PROPERTY
Name: LastError DataType: String Mode: Readonly Description: Returns the last error message generated by the object.
If IsError is True you can display or act on the contents of the LastError Property.
See Also: ClearErrors()
Example: Dim myXMLObj As New EHL7.QSXML Dim strXML As String strXML = "<BADXML>>><\BADXML>" With myXMLObj Call .OpenFromString(strXML) If .IsError Then MsgBox .LastError .ClearErrors strXML = "<GOODXML></GOODXML>" Call .OpenFromString(strXML) If .IsError Then MsgBox .LastError .ClearErrors Else MsgBox "Got it right the second time" End If End If End With Set myXMLObj = Nothing
|