Reporting Processing Failures

As with the ProcessFiles method, a record might fail to be migrated into our destination table. Depending on the mechanism you use to track which records have or have not been successfully inserted into the destination table, you may not have to create any cleanup code.

For instance, if you have a flag on the source table to specify whether a record has been processed, and you fail to migrate the record, you most likely didn’t mark it as complete. If you did, it is probably a bug in your service or database implementation because record duplication should not occur. Therefore the only thing to do is log an error, because the next time you query unprocessed records, any that had failed previously will be attempted again. ...

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.