数据库字段类型为,operation_ varchar(255)
赋值语句为
comm.Parameters.Add("@operation_", SqlDbType.VarChar, 255).Value = this.TextBox1.Text.ToString();
然后执行。但存到数据库中此字段为一串问号?请问如何解决?谢谢。
赋值语句为
comm.Parameters.Add("@operation_", SqlDbType.VarChar, 255).Value = this.TextBox1.Text.ToString();
然后执行。但存到数据库中此字段为一串问号?请问如何解决?谢谢。
UPDATE data_detail SET make_status = 12040,operation_ = @operation_ WHERE detail_id = @detail_id;
请问哪里出错了呀?
改成这样试试:
UPDATE data_detail SET make_status = 12040,operation_ = N @operation_ WHERE detail_id = @detail_id
--------------
^_^。确实,他这是个变量了改成这样吧:
exec('UPDATE data_detail SET make_status=12040,operation_==N'''+@operation_+''' WHERE detail_id=@detail_id')