OleDbParameter[] parameters = new OleDbParameter[]{new OleDbParameter("@Cname", DbType.String)};parameters[0].Value = model.Name;StringBuilder sql = new StringBuilder();string sqls = "update ArticleCategories set Cname='1234' where Cid=@Cid";//这行执行起来没问题string sqls = "update ArticleCategories set Cname=@Cname where Cid=@Cid";//这行就不行,晕了。啥原因啊?return OleDbDBHelper.ExecuteNonQuery(sqls.ToString(), parameters) > 0;
//这是C#在操作Access数据库时出现的, Cid=@Cid就没事,set Cname=@Cname 就不行,请问是啥原因啊?
- 6 回答
- 0 关注
- 348 浏览
添加回答
举报
0/150
提交
取消