Populate, save, repopulate same data set later

  • Thread starter Thread starter Benny
  • Start date Start date
B

Benny

I need to populate a table with information then in a seperate utility,
in the same application, pull that data using the same criteria that
was first used and update some values, unique to an id, then save it,
also adding any rows that did not exist before. The user may exit the
application between using these utilities, but they may also move from
one utility to the next without exiting. Im sure I would start with
populating the data in a DataTable, save the DataTable to the database,
and pull the data into a new DataTable. Assuming that is true, my
question is, how would i go about updating the correct rows? Each row
will have its identity, and there will always be thousands of rows in a
selected set of data, millions in all, so iterating through and
checking each row would be very consuming. Any ideas? (or questions)
 
Since you're going to store them in-between the user changing them
and when he exits the application and you want to actually make
the changes (at least, that's what it sounds like), I'd be tempted
to add a column for RowState and set it accordingly, then when you
select back to perform the actual updates, only select the ones
that are modified, added, deleted, etc.

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top