我的TQuery的sql语句是这么一长串的多表关联的sql,所以不方便加where条件,
只好选择了过滤,我以前都是用条件代替过滤的.'select a.CQBLM as cqblm, b.CQXZM as cqxzm, c.CXM as cxm, d.DDLXM as ddlxm,g.DWLSGXM as dwlsgx, h.DWXZM as dwxzm,i.FWJGM as fwjgm, j.FWLXM as fwlxm,'+
    'k.FWLYM as fwlym, l.FWXZM as fwxzm,m.HXJG as hxjg, n. CBMJ as cbmj, n.CBZFK as cbzfk, n.CQZBH as cqzbh, n.CQZH as cqzh, n.DWMC as cqdw, n.FCBH as fcbh, n.FCRQ as '+
    'fcrq, n.FWZL as fwzl, n.GFJE as gfje, n.GYQK as gyqk, n.GZFRQ as gzfrq,'+
    ' WHERE n.CQBLH = a.CQBLH and n.CQXZH = b.CQXZH AND n.CXH = c.CXH AND n.DWXH = e.DWXH'+
   ' AND e.DWXZH =h.DWXZH AND n.SFZH =f.SFZH AND e.DWLSGXH = g.DWLSGXH AND n.HXH =m.HXH'+
   ' AND n.FWJGH =i.FWJGH AND n.FWXZH=l.FWXZH AND n.FWLYH =k.FWLYH AND n.DDLXH =d.DDLXH'+
   ' AND n.FWLXH =j.FWLXH ';我的过滤很简单:
    with MastData.ZFXX_ViewQry do
    begin
        if active then close;
        Disablecontrols;
        open;
        if sqltxt <>'1=1 ' then//比如sqltxt ='1=1 and cxm ='朝南''
        begin
            Filter:= Sqltxt;
            Filtered:= true;
        end;
这样就出错!!!(不管sqltxt等于什么,我先过滤后open也一样);
出错提示为:Operation not applicable.