DeleteVendor()

Top  Previous  Next

Object: EHL7.HL7Vendors

FileName: EHL7.dll

 

METHOD

 

Name: DeleteVendor()

Parameters:   1) strVendorID (String) the GUID  VendorIDof the vendor to delete.

Returns: Boolean

Description: Deletes a vendor definition.

 

*Programming note:  This method will not allow you to delete ALL vendor definitions, if there is only one vendor definition installed in VendorPath, then the method returns false.  Every time this method is called, if a vendor is currently open, it is closed and would have to repoened by calling OpenVendor() again.

 

See Also: VendorPath, OpenVendor()

 

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.DeleteVendor(strVendorID) Then

    MsgBox myVendorObj.LastError

    Set myVendorObj = Nothing

    Exit Sub

Else

    MsgBox "The vendor definition has been deleted"

End If

End Sub