ClearErrors()

Top  Previous  Next

Object: EHL7.EHL7Message

FileName: EHL7.dll

 

METHOD

 

Name: ClearErrors()

Parameters: None

Returns: N/A

Description: Clears the error state of the object.  See also IsError / LastError

 

Example:

Private Sub MessageTest()

Dim myVendorObj As New EHL7.HL7Vendors

Dim myMsg As New EHL7.EHL7Message

Dim strVendorID As String

Dim oSegment As Object

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

With myMsg

   Set oSegment = .CreateMessage(myVendorObj)

   If .IsError Then

     MsgBox .LastError

     .ClearErrors

     Exit Sub

   End If

End With

End Sub