首页 > 代码库 > C#语句对Access中数据更新问题――Update语法错误

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 + "‘;";

 

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