Please help me with the preservation of the database. I add data and save: this.clientTableAdapter.Update (this.databaseDataSet.Client);

After Update directly to the database, everything changes (in the bin folder, but does not change at the root), but after restarting, everything is clean again. In the properties of the database has already changed "Do not copy / Copy if new" - does not help. I would be grateful for the help.

    1 answer 1

    You yourself wrote - everything changes in the bin folder after you call Update. So the data is stored in the database.

    Make sure that at the time of launch the file is not really copied to bin - just compare the size before the build, after the build, and after the application starts. If copied - look at exactly what time - when building or when starting.

    • This is the problem. At the start, it copies the database from the root to bin (in this case, it is necessary to “not copy” in the database properties). Maybe I missed some other properties? - Alexander Sergeev
    • @AlexanderSergeev "Do not copy" should suffice. Try to make a copy of the project and remove all other files from it. If it still will copy the file. - enable in Options / Project and Solutions / Build and Run / MSBuils output verbosity in Detailed and look for file references in the Output window after the build. - PashaPash
    • PashaPash - thank you so much. Created a copy and reconnected the database - it all worked. - Alexander Sergeev