IsError / LastError |
Top Previous Next |
Object: EHL7.HL7File FileName: EHL7.dll
PROPERTY
These two properties go hand in hand
Name: IsError DataType: Boolean Mode: Readonly Description: Returns the error state of the object
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.
Example: 'At Class or Form Declaration Level Private WithEvents myFileObj As EHL7.HL7File
'On Initialize or Load Set myFileObj = New EHL7.HL7File myFileObj.VendorPath = "C:\EasyHL7"
'On Terminate or Unload Set myFileObj = Nothing
'Command Button Private Sub Command1_Click() Dim myVendorObj As New EHL7.HL7Vendors Dim strVendorID As String myVendorObj.VendorPath = "C:\EasyHL7" strVendorID = myVendorObj.GetVendorID("Default","2.3") 'Now open a file If Not MyFileObj.OpenFile("C:\Test.hl7", strVendorID, -1) MsgBox myFileObj.LastError myFileObj.ClearErrors Exit Sub End If End Sub
|