Search code examples
c#databasedatasetsdf

DataSet changes to sdf local database


I created .sdf database in my project.

DataSet for my base was created. So i'm using this DataSet object, and add new rows to tables using DataGridView.

Then I want to save all my changes back to .sdf database.

How I can simply do it? I'm sure there is something for automatically update from DataSet to database.


Solution

  • Use a SqlDataAdapter that has SqlCommands set up for each row. See here for more information on how to use DataAdapters.