Page 1 of 1

How to add params to IBCQuery

Posted: Tue 14 Apr 2015 18:23
by abak
Hello,
I tried to add them in params editor but it is always locked !
How can I do it at Designtime and Runtime ?
Thx.

Re: How to add params to IBCQuery

Posted: Wed 15 Apr 2015 09:22
by ViktorV
The Parameters tab in IBCQuery Editor is not designed for parameter addition. Using it, you can edit parameters, that are automatically generated on the basis of the query on the SQL tab.
To add parameters in runtime, you can use the following code:

Code: Select all

  IBCQuery.ParamCheck := False;
  IBCQuery.Params.Clear;
  IBCQuery.SQL.Text := 'select * from dept where deptno = :deptno';
  IBCQuery.Params.CreateParam(ftInteger, 'deptno', ptInput);
  IBCQuery.ParamByName('deptno').AsInteger := 10;
  IBCQuery.Open;

Re: How to add params to IBCQuery

Posted: Wed 15 Apr 2015 19:11
by abak
Thank you ViktorV.

Re: How to add params to IBCQuery

Posted: Thu 16 Apr 2015 05:48
by ViktorV
Feel free to contact us if you have any further questions about IBDAC.