OleDbCommand.ExecuteNonQuery() does not save changes in ms access database

后端 未结 2 1822
清歌不尽
清歌不尽 2020-12-11 12:23

I have .mdb database, and code like this:

using (OleDbConnection connection = new OleDbConnection(myConnectionString))
{
    using (OleDbCommand         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-11 13:19

    When we we add .mdb in project root in VS ,when change structure ,VS default delete .mdb file in debug folder and replace new file; now you can change this defult :

    1- right click .mdb file and select option

    2- set Copy To Output Directory to Do Not Copy

提交回复
热议问题