奇怪,捕捉不到!
华昌001 2005-02-27 04:57:35 try
if not dm.table.Active then dm.table.Open;
dm.table.Filter:='确认时间<''2002-1-1''';
dm.table.Filtered:=true;
label1.Caption:='满足条件的记录数: '+inttostr(dm.table.RecordCount);
except
showmessage('过滤条件错误!');
exit;
end;
上代码中,当表的过滤条件不合法时,程序崩溃,
except段捕捉不到异常,为什么???
如何判断过滤条件的合法性,有什么好的方法?请求帮助!!!