InputFileError |
Top Previous Next |
Object: EHL7.EHL7Processor FileName: EHL7.dll
EVENT
Name: InputFileError Parameters:
Description: This event will fire when an error is detected in a file prior to processing such as:
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.EHL7Processor '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
|