Passing parms from Delphi to frxIbQuery
Ivan Vere??
Croatia
Hello to all!
I am new in FR4.
In my Delphi app I call report that have own datasets (frIbxQuery-es) with params in sql.
Params are SmallInt type. Before opening report I want to tell frIbxQuery these params from delphi code.
Param is declared in frIbxQuery params, and not at any other place.
I tried to use code from Delphi (after loading from file, previous preparing and showing):
Then I used this approach (my own Idea from delphi programming experience)
and it's worked!
While I must use params sent as string (and expression than value) ?
While using "variables" doesn't work?
And finally, what is correct, fastest and most used way to passing params from delphy to frxIBquery params ?
Thanks to suggestions.
I am new in FR4.
In my Delphi app I call report that have own datasets (frIbxQuery-es) with params in sql.
Params are SmallInt type. Before opening report I want to tell frIbxQuery these params from delphi code.
Param is declared in frIbxQuery params, and not at any other place.
I tried to use code from Delphi (after loading from file, previous preparing and showing):
Variables['myparam'] := 5;
(5 is some smallint value) but FR doesn't set param at this way.Then I used this approach (my own Idea from delphi programming experience)
(FindComponent('frqPOD') as TfrxIBXQuery).ParamByName('myparam').Expression := IntToStr(5);
and it's worked!
While I must use params sent as string (and expression than value) ?
While using "variables" doesn't work?
And finally, what is correct, fastest and most used way to passing params from delphy to frxIBquery params ?
Thanks to suggestions.
Comments
Thanks!