Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Updating recordset advice

Updating recordset advice

Scheduled Pinned Locked Moved Database
questionc++databasecomperformance
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeremy Pullicino
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups