【问题标题】:adoQuery FilteradoQuery 过滤器
【发布时间】:2010-10-17 13:00:29
【问题描述】:

您能否提供一个在 Delphi 7 中使用 ADOQuery 的 Filter 属性的简单示例?

谢谢。

【问题讨论】:

    标签: delphi filter tadoquery


    【解决方案1】:

    在调查历史问题时,我进入了这个问题:

    Delphi ADO Query

    RRUZ 说:

    AdoQuery1.close;
    AdoQuery1.filter := 'your condition goes here';
    AdoQuery1.filtered := true;
    AdoQuery1.Open;
    

    编辑:或只是:

    AdoQuery1.filter := 'your condition goes here';
    AdoQuery1.filtered := true;
    

    【讨论】:

    • 不需要关闭,设置过滤器再打开查询。即使在打开的查询中设置条件(例如 somefield=1),然后 Filtered := true;.
    猜你喜欢
    • 1970-01-01
    • 2023-04-08
    • 2011-04-16
    • 1970-01-01
    • 2022-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多