‘=’附近有语法错误
“‘=’附近有语法错误。”System.Data.SqlClient.SqlException:"'='附近有语法错误publicboolUpdate2(sora_use...
“‘=’附近有语法错误。”
System.Data.SqlClient.SqlException:"'='附近有语法错误
public bool Update2(sora_users_id sui)
{
string sql =
"UPDATE sora_users_id" +
"SET" +
"s_shenpiliucheng = @s_shenpiliucheng," +
"WHERE s_uid = @s_uid";
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@s_shenpiliuchen",sui.s_shenpiliucheng)
};
return SqlHelper.ExecuteNonQuery(CommandType.Text, sql, para) > 0;
}
上面是我写的修改类
为何有错 很好奇 展开
System.Data.SqlClient.SqlException:"'='附近有语法错误
public bool Update2(sora_users_id sui)
{
string sql =
"UPDATE sora_users_id" +
"SET" +
"s_shenpiliucheng = @s_shenpiliucheng," +
"WHERE s_uid = @s_uid";
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@s_shenpiliuchen",sui.s_shenpiliucheng)
};
return SqlHelper.ExecuteNonQuery(CommandType.Text, sql, para) > 0;
}
上面是我写的修改类
为何有错 很好奇 展开
推荐于2017-09-04 · 知道合伙人软件行家
关注
展开全部
string sql =
"UPDATE sora_users_id " + //拼SQL要注意空格
" SET " +
" s_shenpiliucheng = @s_shenpiliucheng," +
" WHERE s_uid = @s_uid";
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@s_shenpiliuchen",sui.s_shenpiliucheng)
new SqlParameter("@s_uid",sui.s_uid) };
"UPDATE sora_users_id " + //拼SQL要注意空格
" SET " +
" s_shenpiliucheng = @s_shenpiliucheng," +
" WHERE s_uid = @s_uid";
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@s_shenpiliuchen",sui.s_shenpiliucheng)
new SqlParameter("@s_uid",sui.s_uid) };
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询