0

I made a DataSet.xds file with VS wizard. Select part of tables works properly. Now I want update a record from a table, I used codes below.

private void AuthorsTableAdapter(DataRow changedDataRow)
    {

            authorsTableAdapter adapter = new authorsTableAdapter();
            adapter.Update(changedDataRow);
    }

This code can change the record and I can see the changes in for example DataGridView, but when I check the DataBase file or restart the application I realize the record(s) doesn't changed! That Update method just changed records in memory not in DataBase file. Any solution?

Sorry for my English and many thanks for your help.

Parham.D
  • 1,158
  • 2
  • 12
  • 31

2 Answers2

0

Is the UpdateCommand property of the adapter populated?

Mike the Tike
  • 1,136
  • 8
  • 9
0

I deleted the DataSet and then make it again without set a copy of database file in project. When you set a copy of database file in project, in every new solution building that database file will copy again. That was the problem!

Parham.D
  • 1,158
  • 2
  • 12
  • 31