Subject RE: [IBO] Re: Refreshing parameterised IB_Query when params change
Author Alan McDonald
Marco, Have you checked to make sure that BeforeOpen fires when you expect
it to? I had to change my usual plan of attack on this because it does not
fire e.g. in the detail dataset when the master scrolls. So it may not fire
when you expect it to either.
Alan

-----Original Message-----
From: Marco Menardi <mmenaz@...> [mailto:mmenaz@...]
Sent: Friday, 28 February 2003 11:10 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Re: Refreshing parameterised IB_Query when params change


--- In IBObjects@yahoogroups.com, "Jason Wharton" <jwharton@i...> wrote:
[cut]
>
> Personally, if input parameter values are being handled in code I don't
> think the events are an appropriate place to be handling them. I
have never
> in all my years programming felt an inclination to assign parameter
values
> in a BeforeOpen event.

Well, that event (BeforeOpen ) is the one Helen suggested many times
as the better place where do this, AFAIR.
I thought that was great having a centralized place that feeds the
query with the correct, up to dated, parameters value, so everywhere I
need "fresh data" I can refresh the query and the query gets the
correct values.
Like OnPrepareSQL is the correct place to "fine tuning" SQL selects
that can't be handled by simply parameters, would be good having a
similar place for parameters updates.
The problem is, as I discovered, that event is not always good.
So, what do you and Helen think about this request of "central
parameter management"?
As a general roule, this would ease developement, bug fixing and code
maintenance, I think.
Thanks
Marco Menardi



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/