AddWithValue
command.Parameters.AddWithValue("@mcUserName", mcUserNameNew);command.Parameters.AddWithValue("@mcUserPass", mcUserPassNew);command.Parameters.AddWithValue("@twUserName", twUserNameNew);command.Parameters.AddWithValue("@twUserPass", twUserPassNew);
并且不要将占位符用单引号引起来。
string SQL = "INSERT INTO `twMCUserDB` (`mc_userName`, `mc_userPass`, `tw_userName`, `tw_userPass`) VALUES (@mcUserName, @mcUserPass, @twUserName, @twUserPass)";
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)