Passing Params to an Query at runtime

Hi,

I have a report which wher the underlying sql is added depending on options choosen from the dialog screen at runtime. The sql is set via sql.add statements.

On one of these options however i need to pass a paramater value to the sql. The paramater will take it's value from a dateEdit control on the dialog form.

I can't figure out how to pass this paramater to the sql statement. I know it has something to do with params.add

Any help would be much appreciated.

sql.add('Select * from "c:\Computech\Mailshot V2\Data\Mailshot.dat" where Tracking=True and PubDate > :PDate Order by FollowUpDate ASC, Plan_Ref');
;)


Comments

  • edited 8:14PM
    U set a variable like that:
    wrote:
    [Test]
    And u put the value like that in the event OnClick by exemple:
    wrote:
    begin
      Test := [Qry."CName"]
    end
    ;)

Leave a Comment