我最近写了Filter如下:
a='a' and (b=NULL or b='')
结果报错!请问如何写比较好.

解决方案 »

  1.   

    在线帮助中说到 比较数字与 比较符号之间要包含一个空格Note: include a space between comparison values and comparison operators in filter expressions. For instance, ensure that there is a space after the field name and before the operator.1.State field is 'CA' or 'MA':
    State = 'CA' or State = 'MA'2 .When a filter is set, Blank records do not appear unless explicitly included in the filter.  For example:
    State <> 'CA' or State = NULL如
    ADODataSet1->Filter = "State = " + QuotedStr("CA") + " OR " + "State = NULL";
    3. 楼主的filter改成下面这三样试试,看哪一种行
    a = 'a' and  b = NULL 
    a = 'a' and  b = ''
    a = 'a' and ( b = NULL or b = '' )