语句adodataset1.Filter :='mid(c,1,1)=1'
但提示错误“参数类型不正确类型,或者不可以在接受的范围之内,或与其它参数冲突”
为什么?不能使用mid函数?有没有哪位高手指点指点,非常感谢!
但提示错误“参数类型不正确类型,或者不可以在接受的范围之内,或与其它参数冲突”
为什么?不能使用mid函数?有没有哪位高手指点指点,非常感谢!
解决方案 »
- idpop3接收正文不正确问题 (delphi7+indy9)急,在线等待,不够加分
- 请教局域网中广播问题?
- 关于Delphi对Vcl和自定义组件的跟踪!郁闷中.....
- 谈谈腾讯浏览器!!!!!!!!!
- 如何从email中下载邮件及其付件呢?
- 能否介绍一些delphi画曲线图资料的网站
- 程序未触发任何异常的自动退出如何查找原因
- 问关于一个indy 中,idftp的问题
- 如何控制针式打印机的走纸?
- chart按照Y值,在一个区间外设置填充色【有图】
- win98下,窗体上Combobox控件较多时,运行报错:'A Call to an OS function failed',谁能解决重分相谢!!!
- 关于数据填充的问题。。各位帮帮忙吧,谢谢了
Operatoror function Example Supported by other datasets Comment
Comparisons
= State = 'CA' Yes
<> State <> 'CA' Yes
>= DateEntered >= '1/1/1998' Yes
<= Total <= 100,000 Yes
> Percentile > 50 Yes
< Field1 < Field2 Yes
BLANK State <> 'CA' or State = BLANK Yes Blank records do not appear unless explicitly included in the filter.
IS NULL Field1 IS NULL No
IS NOT NULL Field1 IS NOT NULL No
Logical operators
and State = 'CA' and Country = 'US' Yes
or State = 'CA' or State = 'MA' Yes
not not (State = 'CA') Yes
Arithmetic operators
+ Total + 5 > 100 Depends on driver Applies to numbers, strings, or date (time) + number.
- Field1 - 7 <> 10 Depends on driver Applies to numbers, dates, or date (time) - number.
* Discount * 100 > 20 Depends on driver Applies to numbers only.
/ Discount > Total / 5 Depends on driver Applies to numbers only.
String functions
Upper Upper(Field1) = 'ALWAYS' No
Lower Lower(Field1 + Field2) = 'josp' No
Substring Substring(DateFld,8) = '1998'Substring(DateFld,1,3) = 'JAN' No Value goes from position of second argument to end or number of chars in third argument. First char has position 1.
Trim Trim(Field1 + Field2)Trim(Field1, '-') No Removes third argument from front and back. If no third argument, trims spaces.
TrimLeft TrimLeft(StringField)TrimLeft(Field1, '$') <> '' No See Trim.
TrimRight TrimRight(StringField)TrimRight(Field1, '.') <> '' No See Trim.
DateTime functions
Year Year(DateField) = 2000 No
Month Month(DateField) <> 12 No
Day Day(DateField) = 1 No
Hour Hour(DateField) < 16 No
Minute Minute(DateField) = 0 No
Second Second(DateField) = 30 No
GetDate GetDate - DateField > 7 No Represents current date and time.
Date DateField = Date(GetDate) No Returns the date portion of a datetime value.
Time TimeField > Time(GetDate) No Returns the time portion of a datetime value.
Miscellaneous
Like Memo LIKE '%filters%' No Works like SQL-92 without the ESC clause. When applied to BLOB fields, FilterOptions determines whether case is considered.
In Day(DateField) in (1,7) No Works like SQL-92. Second argument is a list of values all with the same type.
* State = 'M*' Yes Wildcard for partial comparisons.
When applying ranges or filters, the client dataset still stores all of its records in memory. The range or filter merely determines which records are available to controls that navigate or display data from the client dataset.
那如果函数不支持的话,有没有其它的办法实现?
不知道还有没有其它的办法
我原来考虑过小虫的sql查询的办法,但我估计查询量大,速度会慢,所以采用filter。不知道有没有好的解决办法
没找到mid函数不要太钻牛角尖