Good day. Can you please tell me how to reload the database to apply the changes? Suppose I entered some data into the database. But they do not immediately appear on other forms. For this, I created a button for updating the database, with the code (4it is the name of the database):

Me._4itDataSet.Reset() 

But this helped only partially - as some tables do not reload. Then added some more code:

  Me._4itDataSet.Reset() Me.Виды_работTableAdapter.Fill(Me._4itDataSet.Виды_работ) Me.ДоговорTableAdapter.Fill(Me._4itDataSet.Договор) Me.ИсполнительTableAdapter.Fill(Me._4itDataSet.Исполнитель) Me.ПользователиTableAdapter.Fill(Me._4itDataSet.Пользователи) Me.Физические_лицаTableAdapter.Fill(Me._4itDataSet.Физические_лица) 

It still did not help ... So the question is how to reload the database?

Thanks in advance for the answer

  • Me.Physical_litTableAdapter.Fill (Me._4itDataSet.Physic_litz) - wow! my brain is protesting! - Andrew Frolov
  • The usual code for loading data into a datagrid is created simultaneously with dragging a datagrid from a datasurz onto a form. What's wrong? - qwermakarenko
  • Russian-English variable names :) - Andrew Frolov
  • Aaa) But it's easier for me - it is better remembered) In Russian - the names of the tables, in English - everything else) - qwermakarenko


1 answer 1

Problem solved - line

  Me._4itDataSet.Reset() 

was absolutely superfluous enough

  Me.Виды_работTableAdapter.Fill(Me._4itDataSet.Виды_работ) Me.ДоговорTableAdapter.Fill(Me._4itDataSet.Договор) Me.ИсполнительTableAdapter.Fill(Me._4itDataSet.Исполнитель) Me.ПользователиTableAdapter.Fill(Me._4itDataSet.Пользователи) Me.Физические_лицаTableAdapter.Fill(Me._4itDataSet.Физические_лица)