Hello! I have a database in SQL and it is displayed all in visual studio, everything is written in C # ...

The procedure for deleting a string in the database works, but not in the studio! when you press a button, nothing happens at all, even no errors ... can you advise where approximately it can be viewed?

button code such

*private void button12_Click(object sender, EventArgs e) { if (PlanListDataGridView.SelectedRows != null) { int id = (int)PlanListDataGridView.SelectedRows[0].Cells[0].Value; PlanList.DeletePlan(id); PlanListBindingSource.DataSource = PlanList.GetPlanList(); } }* 
  • PlanList.Fill () - MaximK

2 answers 2

If PlanList is something like a DataSet , then you probably still need to call the Update method on the data adapter.

    You delete from the table, but you should delete it from the data source. Then the data in the table and updated.

    • PlanList is most likely an adapter. Simply it should be overloaded most likely. - MaximK