Data Tracking Validation
The preceding section demonstrated how to monitor for data and then insert it into the database. However, if a record failed to be inserted, nothing stops that record from being lost to us forever. Yes, you could look in the Application log, but this is tedious and not a very good solution. Therefore we are going to add some extra validation, logging, and notification.
Creating Process Error Folder
First we need to create a directory to store our records that fail to get inserted. In the same directory as our incoming directory, add a directory called ProcessError. This is where we will store our records that fail.
You can store the failed records two ways:
Create a file per failed record.
Create one file and add all failed ...
Get Programming Windows® Services with Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.