I have a working English-Russian dictionary. Words and translation takes from the attached database. When I try to add new values ​​or edit old ones, by using the "+" and "x" buttons on the standard control panel (it was created automatically, I didn’t change anything in it) sometimes it crashes (see screen), while the data is naturally not saved . One person advised to download Nuget, download MySql and continue dancing with a tambourine.

How can I remove / correct this error without recasting everything?

Screen Screen of the place in the code where the bug was caught, at the stage of debac C #

  • And sometimes the changes are saved? It is not entirely clear whether it is stably sprinkling. - Monk
  • That's right, when there is no such error - the changes are saved ... "... It’s not quite clear whether it is stabling steadily ...." - I didn’t understand what you were talking about .. = ( - Atos
  • one
    Add the text of the error in the name of the question so that others can find it. - Ella Svetlaya
  • Your question is similar to the following: "Guess how everything is done with me, and tell me what to change to avoid this error." The message definitely speaks about the problem with tableAdapterManager.UpdateCommand - very likely, ee ( UpdateCommand ) is missing. - Igor
  • The "Refresh table ..." function is inaccessible, the selection is inactive, the id field is added, and there is a ban on entering empty lines. In the data source on the update button poked. - Atos

1 answer 1

Clearly glitch with the database. Solution options:

  1. Go to the Dataset designer (Menu "Data" - "show data sources" - "Edit dataset with designer". In the context menu of the adapter, select "Configure" - "Advanced options". Make sure that "Refresh the data table" is selected Click OK and Finish.

  2. There is no primary key in the database or it contains incorrect data (for example, if there was an import from Access). Check the table, key columns, the uniqueness of the data in them, the absence of null values.

  • DB is made in Acces. There is one table with En and Ru fields. Id not done. Tell me the other - Atos
  • Looked at what you said. The "Refresh table after query execution" option is inactive. Is it because of the lack of id? Removed the ability to enter empty fields in the database. Problem still exists. Regarding the text of the error - add, required. - Atos
  • I recommend creating a primary key in the table. - Ella Svetlaya
  • created, all the same. Maybe there it is necessary to make it clear to the studio that the primary key appeared there? - Atos
  • There is a new error, when deleting now and when editing. Can anyone tell me how to throw off the screen in the comments? - Atos