Dataview rowfilter evaluateexception [英] Dataview rowfilter evaluateexception

查看:108
本文介绍了Dataview rowfilter evaluateexception的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我说我在桌面栏上的记录是姓名

这个记录是'阿里是个男人'

我正在尝试什么

Dv.rowfilter =名字就像'a%m%'

我喜欢SQL like子句但是它会触发异常EvaluateException

带有消息Error in like operator:字符串模式'a%m%'无效

任何帮助,请



我尝试过:



Let's say I have record at table column is "Name"
This record is 'Ali is a Man'
What I'm trying
Dv.rowfilter= "Name like 'a%m%'"
I do it like SQL like clause but it fires exception EvaluateException
With message Error in like operator: the string pattern 'a%m%' is invalid
Any help ,please

What I have tried:

Dv.rowfilter= "Name like 'a%m%'"

推荐答案

在开头或结尾或两者都允许使用通配符字符,但不允许使用中间字符。以下内容将被允许并包含您的目标行。

Wildcard chars are allowed at begining or end or both but not the middle. The following would be allowed and would include your target row.
Dv.rowfilter="Name like '%a m%'"



运算符LIKE用于仅包含与带通配符的模式匹配的值。通配符是*或%,它可以位于模式'* value'的开头,结尾'value *'或'* value *'。不允许在patern'va * lue'中间使用通配符。来自 DataView RowFilter语法[C#] [ ^ ]


这篇关于Dataview rowfilter evaluateexception的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆