DeleteHL7Table() |
Top Previous Next |
Object: EHL7.HL7Vendors FileName: EHL7.dll
METHOD
Name: DeleteHL7Table() Parameters: 1) nTableID (Long) The HL7 Table ID Returns: Boolean Description: Returns True if the table is successfully deleted. On failure check the LastError property for the error description.
Example Code to do this: Private Sub VendorTest() Dim myVendorObj As New EHL7.HL7Vendors Dim strVendorID As String Dim strXML As String Dim domNode As Object Dim myXMLObj As New EHL7.qsXML myVendorObj.VendorPath = "C:\EasyHL7" 'Process the XML 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 myXMLObj strXML = "<TABLE></TABLE>" .OpenFromString strXML Set domNode = .GetRootElement() .SetAttribute domNode, "TABLEID", "2222" .SetAttribute domNode, "TABLENAME", "My Test Table" .SetAttribute domNode, "ITEMGUID", CreateGUID() 'The order of the attributes is not important .SetAttribute domNode, "SYSUSER", "User" strXML = .XML End With If Not myVendorObj.AddHL7Table(strXML) Then MsgBox myVendorObj.LastError Exit Sub End If 'Now we have added table 2222 let's delete it If Not myVendorObj.DeleteHL7Table(2222) Then MsgBox myVendorObj.LastError Exit Sub End If
End Sub
|