asp.net不能修改access数据库中的记录 10
asp.net连接access数据库时能够对数据库中记录进行添加和删除就是不能修改。将数据库所在文件夹中的--》属性--》安全设置过了也没用。代码肯定不会错的,全手动操作...
asp.net连接access数据库时能够对数据库中记录进行添加和删除就是不能修改。将数据库所在文件夹中的--》属性--》安全设置过了也没用。代码肯定不会错的,全手动操作的也不能修改。请高手指教如何解决这样的问题。
语法没有出错 展开
语法没有出错 展开
3个回答
展开全部
参数不正确....
string sqlinfo = "UPDATE [systemuser] SET [sex]='" + sex + "'," + "[address]='" + address + "'," + "[jiguan]='" + jiguan + "'," + "[minzu]='" + minzu + "'," + "[tel]='" + tel + "'," + "[mobile]='" + mobile + "'," + "[hunfuo]='" + hunfuo + "'," + "[shengri]='" + shri + "'," + "[idcard]='" + idcard + "'," + "[age]=" + age + "," + "[bank]='" + bank + "'," + "[banknumber]='" + banknumber + "' where [id]=" + updatid;
OleDbCommand infocmd = new OleDbCommand(sqlinfo, conn);
infocmd.ExecuteNonQuery();
string sqlinfo = "UPDATE [systemuser] SET [sex]='" + sex + "'," + "[address]='" + address + "'," + "[jiguan]='" + jiguan + "'," + "[minzu]='" + minzu + "'," + "[tel]='" + tel + "'," + "[mobile]='" + mobile + "'," + "[hunfuo]='" + hunfuo + "'," + "[shengri]='" + shri + "'," + "[idcard]='" + idcard + "'," + "[age]=" + age + "," + "[bank]='" + bank + "'," + "[banknumber]='" + banknumber + "' where [id]=" + updatid;
OleDbCommand infocmd = new OleDbCommand(sqlinfo, conn);
infocmd.ExecuteNonQuery();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询