C#语句对Access中数据更新问题――Update语法错误

所有字段最好都用[] 括起来:

string sqlUpdate = "update UserInfo set [password] = '" + pass + "',[email] = '" + txt_email.Text + "',[realName] = '" + txt_realName.Text + "',[phone] = '" + txt_phone.Text + "' where [username] = '" + name + "';";

 

posted @ 2014-09-11 22:47  kanek  阅读(1532)  评论(0编辑  收藏  举报