"Error: System.Data.OleDb.OleDbException (0x80004005): The following query has been corrupted: '' [duplicate]

那年仲夏 提交于 2019-12-08 02:05:47

问题


This morning the program stopped running with this error message. Only works on my machine, everyone else. This program has been running for two years and no such bug has occurred so far. What could be the reason? Nothing has changed since last night. I also reinstalled the ACCESS 2016 64x runtime, but unfortunately it did not improve.

This is a part of the update method:

string _AccessOperation_command = "UPDATE [" + targettables.Trim() + "] SET " + subcommandUpdatestring +
                                       " WHERE " + wherecondition.Trim();

    OleDbCommand update_dbCommand = new OleDbCommand(_AccessOperation_command, myConn);
    for (int i = 0; i < tombmeret; i++)
    {
       update_dbCommand.Parameters.AddWithValue("@" + targetField_intoValue[i, 0], targetField_intoValue[i, 1]);
    }

    try
    {
      var rowsAffected = update_dbCommand.ExecuteNonQuery();
      successUpdate = true;
    }
    catch (Exception ex)
        {
          _MasterErrorText = "Error: " + ex;
          successUpdate = false;
          return successUpdate;
        }

    return successUpdate;

回答1:


I found a bug, unfortunately I need to uninstall the latest Office ACCESS2016 security update. only this will solve it.



来源:https://stackoverflow.com/questions/58833923/error-system-data-oledb-oledbexception-0x80004005-the-following-query-has-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!