asp.net 连接数据库的问题总结

string sql = "UPDATE" + sqlname + "set PassWord = ‘"+password+ "‘WHERE Id =‘"+ id+"‘";//报错
//check the manual that corresponds to your MySQL server version for the right syntax to use near ‘UPDATEuserset PassWord = ‘4‘WHERE Id =‘9‘‘ at line 1” 问题解决办法
解决
string sql = string.Format("update " + sqlname + " set PassWord =‘" + password + "‘ where userName = " + name);

asp.net 连接数据库的问题总结

上一篇:mysql 秒转化为-时分秒


下一篇:cenos8安装mysql8.0教程综合版