Local database inserts not being stored

前端 未结 2 338
北海茫月
北海茫月 2021-01-23 05:47

This is probably a stupid mistake of me.. but I can\'t seem to understand it.

I\'ve created a new, empty C# Windows Forms application.

I added a Database (Based

2条回答
  •  攒了一身酷
    2021-01-23 06:07

    Your database file is listed in the project with this property

     Copy to destination directory = Copy Always
    

    If this is true then every time you restart the project a fresh (empty) copy of the database file is copied from the project directory to the output directory (BIN\DEBUG or BIN\RELEASE) overwriting the database file used in the previous run. You could avoid this changing the property to Copy Never or Copy if newer

提交回复
热议问题