O'Reilly logo

Programming Windows® Services with Microsoft® Visual Basic® 2008 by Michael Gernaey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required