• Access中参数错误的问题


    string sql = "update tb_type set typename=@typename,describe2=@describe2 where id=@id";
               OleDbParameter[] parameters = {
                     
                        new OleDbParameter("@typename", OleDbType.VarChar,50),
                        new OleDbParameter("@describe2", OleDbType.VarChar,50),
                        new OleDbParameter("@id", OleDbType.Integer,4)};
              

             
               parameters[0].Value = model.typename;
               parameters[1].Value = model.describe2;
               parameters[2].Value = model.id;

    在access中居然要求顺序依次对应,今天这个错误做的,哎

  • 相关阅读:
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
  • 原文地址:https://www.cnblogs.com/bloodofhero/p/1869142.html
Copyright © 2020-2023  润新知