Subject Re: [IBO] DML cache question
Author Tomas Michalik
Hi Set,

thanks for your advice. I'll try to use this solution with a small
change (I had this idea too), although I would prefer different one if
it existed.

I will need to change the code I use to generate the LIST_QUERY WHERE
criteria. Currently I assemble this in the OnPrepareSQL handler, where
I'm adding different conditions based on UI controls' state using
SQLWhereItems.Add(...). All these conditions together must be "ORed"
with the condition you proposed, so I will have to assemble the whole
thing by myself and then add it to SQLWhereItems.

Anyway, I will try that.

Best regards,

Svein Erling Tysvær wrote:
> Hi Tomas!
> >I want to achieve something that seems impossible to me, but I would
> >like to know what is really possible from the ones with a deeper
> >understanding of IBO internals.
> Maybe it's impossible using the IBO internals, but a bit of imagination
> normally solves impossible things.
> >When inserting new record in ITEM_QUERY, I want it to appear in
> >LIST_QUERY too. If the LIST_QUERY criteria is met in this newly inserted
> >record I am able to achieve this via DML cache. If the criteria differs,
> >I can't do that.
> For a lazy programmer like me, the simplest solution seems to be to make
> the criteria match, which at least should be possible the following way:
> 1) Create a new field in your table and a new generator. If you want
> indexes to be used you should probably add an index for (<newfield>, <pk>).
> 2) Grab a new value from this generator.
> 3) Add to your LIST_QUERY something like 'OR <newfield> = <grabbedvalue>'
> 4) When inserting through ITEM_QUERY, set the new field to the value you
> grabbed
> That's it. Now every record you insert will match your criteria!


Tomas Michalik
ProCA, s. r. o.
V Luzich 818, Praha 4
Czech Republic

e-mail: michalik@...
tel: +420 2 67283446