InputFileError

Top  Previous  Next

Object: EHL7.CommandoProcessor

FileName: EHL7.dll

 

EVENT

 

Name: InputFileError

Parameters:

1.strFileName (String) the full path and file name of the file that is in the InboundPath but contains the error.
2.bCancelErrorAction (boolean).  Read/Write, can be set to True to override error handling (see below).

 

Description: This event will fire when an error is detected in a file prior to processing such as:

1.The file does not contain HL7 data

2.    The file cannot be opened for some reason (such as insufficient user permissions).

 

*When responding to this event you can override the default error handling of the object (which is to move the file to the  folder designated in the ERRORPATH property) by setting the bCancelErrorAction parameter to true.

 

Example:

'Declare the object in a class module or form

Private WithEvents oProcessor As EHL7.CommandoProcessor

'Don't forget to initialize the object in the form/load or the class/initialize event.

 

'Event Handler

Private Sub oProcessor_InputFileError(strFileName As String, bCancelErrorAction As Boolean)

'Say you don't want the processor object to move the file to the ERRORPATH folder

  bCancelErrorAction = True

  'Show the Error

  Msgbox oProcessor.LastError

  'Clear the Error

  oProcessor.ClearErrors

  'Just delete the file

  Kill strFileName

End Sub

 

 

Related Items: EasyHL7 Events in VB