Updating recordset advice
-
I have a table with only one field of type string. This table is loaded into a list control and the user is allowed to manipulate its data by adding/removing elements on it. When the user is ready he has the option to save this list back to the database. Effectively I have two lists, list A which exists on the database and list B which exists in memory. List B is mofified by the user and must be saved back to List A in the database. In your opinions, what is the best method to use when saving list B? 1. Delete all records from A and dump B into A 2. Iterate B, checking for each item's existence in A. If item does not exist, add to A. Iterate A and check for each item's existence in B. If item does not exist in B, delete it from A 3. Like (2) but other way around. Iterate A checking for each items existence in B. If item does not exist, delete it from A. Iterate B and check for each item's existence in A if item does not exist, add it to A There could be around 10,000 records in the list. List A and list B do not necessarily have to exist on the same computer - they might be connected over the LAN. Jeremy Pullicino C++ Developer Homepage