Subject | Re: [IBO] Re: Refreshing parameterised IB_Query when params change |
---|---|
Author | Helen Borrie |
Post date | 2003-03-01T15:15:31Z |
At 02:37 PM 1/03/2003 +0000, you wrote:
provides a generic, event-context-free handler for assigning values to
parameters from whatever source (variables, the Row property of another
dataset, a value in an edit-control, etc.).
it's just a block of generic implementation code that can be called when it
is timely to do so, from an event handler. In some cases I might write the
block to take a variant array containing some values, an object reference
to tell the handler where the call was made, I might pass various var
arguments, I might make it a function that returns a success/failure
result. The point is, your handler code for such a thing is
implementation-specific.
property of one or more members of the Params[] collection. It doesn't
need to be added, as it is already there.
is already invalidated. You can call InvalidateSQL yourself when you need
to, but there are events where the SQL gets "invalidated" by virtue of the
SQL property being cleared and/or altered (or presents as empty).
happening at the various phases (but probably breaks the current event
chain) and I can't see what benefit it would have.
chain already implemented by Jason.
convince me.
the proper behaviour of the buffers and the parsing levels. More
confusions for developers, not less. Furthermore, I don't see any benefits.
Sorry, Marco.
regards,
Helen
\btw, it's 0215 here and I'm going to bed. <g>
>Well, this clarifies your position / code, but also makes my requestNo, it's not a "parallel design". It's a implementation-level method that
>even stronger.
>As you say, CheckBrowseMode() is a useful method, since "will perform
>different actions under different conditions". It's "dataset aware",
>we could say.
>For parameters, you had to build a "parallel" design just because you
>don't have a Dataset event ("entry point") where you could safely put
>your parameter assignment code.
provides a generic, event-context-free handler for assigning values to
parameters from whatever source (variables, the Row property of another
dataset, a value in an edit-control, etc.).
>What I'm asking is include this useful event in IBO standardNo, I don't need an event. A method like AssignParams is not an event,
>components, and I'm now sure you would like it too.
it's just a block of generic implementation code that can be called when it
is timely to do so, from an event handler. In some cases I might write the
block to take a variant array containing some values, an object reference
to tell the handler where the call was made, I might pass various var
arguments, I might make it a function that returns a success/failure
result. The point is, your handler code for such a thing is
implementation-specific.
>In addition, the "refresh" use is usual:But the invalidation *already* occurs, as a result of altering the Value
>a) get the server updated data with the same parameters
>b) get new data with updated parameters
>what's the behaviour with your code? Only in b) the invalidation is
>necessary.
property of one or more members of the Params[] collection. It doesn't
need to be added, as it is already there.
>In the new "OnParamAssign" event, IBO could check if paramsIt already does it.
>have been changed and invalidate only if necessary... (I'm not expert
>in deep IBO/FB working, so maybe I'm telling silly things).
>In addition, in the b) situation, when you use OnParamSQL event, youDo you mean OnPrepareSQL? If OnPrepareSQL is called, it means that the SQL
>have to invalidate the query to make this event work.
is already invalidated. You can call InvalidateSQL yourself when you need
to, but there are events where the SQL gets "invalidated" by virtue of the
SQL property being cleared and/or altered (or presents as empty).
>All this "lowWhat is OnParamSQL? I have never heard of it...
>level" IBO is confusing for beginners / intermediate, and often is
>error prone (you lately introduce OnParamSQL, and all your "refresh"
>becomes useless).
>So, for b), I asked for a "strong refresh" thatIt sounds arcane to me. If anything, it doubles up on what is already
>could do a lot of things for optimising resources and saving time, like:
>a) check in the new "OnParamAssign" what I wrote above
>b) check if the OnParamSQL is nil or some code is set, and invalidate
>only in the latter case
happening at the various phases (but probably breaks the current event
chain) and I can't see what benefit it would have.
>These (of course) seem to be interesting additions to IBO, and I knowMe? No. There's no way I could or would presume to "improve" on the event
>that all the above can be done in code, but I would like to know if
>you can do it in a better way or not.
chain already implemented by Jason.
>IBO is a great time saver in a lot of situations, but why not push itI'm only one user, but you would have to make a much sounder case to
>benefits a little further?
convince me.
>What disadvantages can you see in the above?Broken event chain. Custom handlers being made capable of interfering with
the proper behaviour of the buffers and the parsing levels. More
confusions for developers, not less. Furthermore, I don't see any benefits.
Sorry, Marco.
regards,
Helen
\btw, it's 0215 here and I'm going to bed. <g>