OpenFile() |
Top Previous Next |
Object: EHL7.HL7File FileName: EHL7.dll
METHOD
Name: OpenFile() Parameters: 1) strFileName (String) a fully qualified path/filename to a file containing HL7 Messages 2) strVendorID (String) the GUID VendorID of the vendor object to use 3) nMaxLoad (Optional Long) Default = 0. The number of messages to process within the file (<= 0 means ALL messages. Returns: Boolean Description:
Related Events: Process, ProcessCompleted, MessageRead, MessageProcessed, KeepMessagesInMemory
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 Dim iCnt As Long myFileObj.KeepMessagesInMemory = True 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 iCnt = myFileObj.MessageCount MsgBox "File contains " & iCnt & " hl7 messages"
End Sub
|