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

后端 未结 2 1699
清歌不尽
清歌不尽 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

    0 讨论(0)
  • 2020-12-11 13:25

    It is most likely the WHERE clause of your update statement isn't locating any records to update.

    http://weblogs.asp.net/stevewellens/archive/2009/10/16/why-sql-updates-fail-three-reasons.aspx

    0 讨论(0)
提交回复
热议问题