Dataset to Sql Server Ce

  • Thread starter Thread starter cox
  • Start date Start date
C

cox

How can I take a erived dataset and populate a sql server ce database table
that matches the dataset.

I understand the concept of taking a table (ex. via sql) from sql server ce
and using a data adapter to fill a dataset...now how can I reverse the
process.
 
use the DataAdapter.Update on it. Just make sure the rowstate or each of
the rows in Added. Then when update is called, it will fire your Update
Command on the row mapping the row values to the params in the update
command.. If you are filling it from somewhere else, set the
..AcceptChangesDuringFill property to false when you do this this way the
rows will all look like they've been added. If you serialize it to xml,use
the diffgram option which will save the state. Then you can deserialize it
with the state in tact, and just call update. If you have a valid Insert
Command (and Delete/Modify if you are doing that), all you need to do is
call update.
 
Back
Top