문제

I dont know why I have below error:

Missing operand after ''%اح%'' operator.

on

dv.RowFilter = "[customer] LIKE N'%" + value + "%'";

also I changed code to:

dv.RowFilter = "[customer] LIKE N'%" + value.Replace(@"'", "''") + "%'";

but still I have error.

Note: I used alias for column name of table. so "customer" is alias

도움이 되었습니까?

해결책

if type of field is NVARCHAR, you shouldn't use "N" in C# codes.

dv.RowFilter = "[customer] LIKE '%" + value + "%'";
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top