Subject Re: [IBO] Re: Refreshing parameterised IB_Query when params change
Author Jason Wharton
I think I've put together a sufficiently complete array of inter-related
properties. It may seem like a simple thing to add in new functionality but
there is one thing I want to establish clearly and that is that IBO isn't a
hodge-podge of features that you are forced to pick and chose from. I have
very painstakingly added features in a way that has them fully integrated
where possible with all other existing features. I will not add in
additional features unless they will harmonize with the existing feature
set. Thus, just adding in new features can be more difficult that first
glance would reveal.

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.

FWIW,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: <mmenaz@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, February 23, 2003 7:47 AM
Subject: [IBO] Re: Refreshing parameterised IB_Query when params change


> Well, refresh does open the query if you set "RefreshAction" to
> raOpen, but this does not solve complitely the problem, since I often
> user refresh for "refreshing" the grid content, and I need
> raKeepDataPos, and when some conditions change (i.e. fiscal year) I
> need to "refresh" the dataset in the way the new parameters are taken
> in the query.
> In addition, would be good if my suggested "very refresh" could have a
> look at the OnPrepareSQL event and, if code is present, invalidate the
> query so that code will be executed.
> I think that IBO can easely be improved and optimized with this new
> method, since can be checked if RefreshAction is already to raOpen and
> if OnPrepareSQL has code linked, and take the necessary actions
> minimizing overhead (i.e. if RefreshAction = raOpen and no code for
> OnPrepareSQL -> simply Refresh, if RefreshAction <> raOpen and no
> code for OnPrepareSQL, close + open (only if already open? Maybe
> adding a parameter defaulted to true), and if RefreshAction <> raOpen
> and teher is code for OnPrepareSQL, Close, InvalidateSQL, Open (only
> if already open?).
> Any comment / suggestion / opinion / volunteer?
> thanks
> Marco Menardi
>
>
> --- In IBObjects@yahoogroups.com, "Marco Menardi <mmenaz@l...>"
> <mmenaz@l...> wrote:
> > Reading this list I've learned that a convenient place where put
> > parameter assignment of a IB_Query is in the BeforeOpen event.
> > The problem is that when the param values have to be changed, a
> > refresh (or RefreshAll) does not fire the BeforeOpen, so I have to
> > close/open the query (2 lines of code... too many, I'm lazy).
> > Is there another method (a sort of "very refresh") or a better event
> > (BeforeRefresh?) where centralize parameter assignment?
> > Thanks a lot
> > Marco Menardi