求助:OleDbCommand 执行Update Access数据库,出现“至少一个参数没有被指定值”
执行Delete没有问题

解决方案 »

  1.   

    string str = "Update teProduct set ProtectName = 'qq',ProductMainSpec = 'qq',ProductOtherSpec = 'qq',ProductPrice= 'qq',ProductUnit = 'qq' Where ProductID = 29";
    OleDbConnection myconn = new OleDbConnection(Conn);
    myconn.Open();
    OleDbCommand mycmd = new OleDbCommand(str,myconn);
    mycmd.ExecuteNonQuery();
    myconn.Close();
      

  2.   

    把你的代码贴出来看看啊,应该是你的SQL有问题,添加值的时候有问题
      

  3.   

    想也不用想 当然是UPDATE语句的问题
      

  4.   

    这就是原语句
    那个OleDbConnection myconn = new OleDbConnection(Conn);里的Conn没问题的,这个没写出来了
      

  5.   

    SQL语句问题。可能是字段多了。
      

  6.   

    string str = "Update teProduct set ProtectName = 'qq',ProductMainSpec = 'qq',ProductOtherSpec = 'qq',ProductPrice= 'qq',ProductUnit = 'qq' Where ProductID = 29";
    這裡好像ProductID='29'吧