Reputation: 3
I am in the midst of creating a program that reads data from an SQL table, changes it via code in VB, and then stores it. Upon completion of the program, the temporary table is looked at and all rows that have the same email address are aggregated (a Message Column is combined for all those) and a single entry is written to an SQL table that one at a time sends out an email.
Time is of the essence for this program, so the quicker it is done the better.
The question is, should I create a table in SQL to serve as the temporary table, or should I use DataSets/DataTables and keep the Temporary table in memory while hte program is running.
Thanks for your time in advance, Greg
Upvotes: 0
Views: 220
Reputation: 52675
I think the driving requirement is how do you want to recover from a failure? Do you reprocess from the beginning or do you want provide a recovery mode?
If you want to start from the beginning an in-memory structure (like a DataSet) is fine. However if you want "pick up from where you left off" you'll need to store your progress in a persistent storage.
In the past I've used a table in a DB to mark the individual successes and failures and included both automatic and manual recovery modes. This enabled me to handle, intermittent, systemic, and single case problems effectively.
Upvotes: 1
Reputation: 432667
I'd use a DataTable/DataSet:
Upvotes: 0