yes, I have seen this, that I must put the Param BEFORE opening.
And sure I did.
Probably it would not even compile the other way round.
No no. You misunderstand. You need to put this in the OnBeforeOpen EVENT.
That's something different from "before opening".
The BeforeOpen event is executed automatically before Open.
And the TIBDynamicGrid does Close and Open itself.
So create the OnBeforeOpen event by doub;e clicking the event and put the ParamByName there.
As the DBGrid just as replacement works, - so the trouble shall be somewhere in the DBDynamicGrid.
The point is that TDBDynamicGrid changes the SQL statement and need to do a Close and Open for that Query.
And doing that will loose the ParamByName.
So you need to do the ParamByName in the OnBeforeOpen event so it gets executed every time TDBDynamicGrid calls Open.