简化,利用 DataView过滤
this.dvPendingNode.RowFilter = "(node_end_time is null or node_end_time > '2009-6-10 17:55:13')";
this.dvPendingNode.RowFilter += "and degree_name in ('', '进行', '暂停', '搁置') ";
1. 我在一个winform程序里用DataView的RowFilter筛选时用两个下划线代表两个字符,但是怎么筛选不出来的?
http://topic.csdn.net/t/20040814/04/3273316.html
Q:
我在一个winform程序里用DataView的RowFilter筛选时用两个下划线代表两个个字符,如:
dv.RowFilter="PID LIKE '"+str+"-__",这样的筛选语句在SQL企业管理器里执行是能正确筛选到记录的,但是为什么在这里就一个都筛选不出来?是不是这里要用别的符号来代表一个字符啊。
A:
"_" is probably very sql server specific, classes in System.Data is supposed to be DBMS independent, you can try to use
ABC LIKE 'abc*' AND LEN(ABC)=5
我在一个winform程序里用DataView的RowFilter筛选时用两个下划线代表两个个字符,如:
dv.RowFilter="PID LIKE '"+str+"-__",这样的筛选语句在SQL企业管理器里执行是能正确筛选到记录的,但是为什么在这里就一个都筛选不出来?是不是这里要用别的符号来代表一个字符啊。
A:
"_" is probably very sql server specific, classes in System.Data is supposed to be DBMS independent, you can try to use
ABC LIKE 'abc*' AND LEN(ABC)=5
2. ListBox 多项选择(DataRowView)