IsError / LastError |
Top Previous Next |
Object: EHL7.HL7Vendors FileName: EHL7.dll
PROPERTY
These 2 properties go hand in hand
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.
Each time you issue a call to a method in the EHL7.HL7Vendors object you can check these two properties.
If IsError is True you can display or act on the contents of the LastError Property.
Example: Private Sub VendorTest() Dim myVendorObj As New EHL7.HL7Vendors Dim strVendorID As String myVendorObj.VendorPath = "C:\EasyHL7" strVendorID = myVendorObj.GetVendorID("Default","2.3") If strVendorID = "" Then MsgBox myVendorObj.LastError Set myVendorObj = Nothing Exit Sub End If If Not MyVendorObj.OpenVendor(strVendorID) Then MsgBox myVendorObj.LastError Set myVendorObj = Nothing Exit Sub End If MsgBox myVendorObj.FieldSeparator If myVendorObj.IsError Then MsgBox myVendorObj.LastError End If End Sub
|