Subject Re: [IBO] TIBOQuery & kbmMemTable: access violation
Author Lester Caine
>>Not sure that I like the 'flow' of this
> I guess I tried every possible change, but the problem stays.

If you single step through the code you should see what is
causing the problem. I have been caught out a couple of
times when previous 'prepares' have left things open and I
have not closed them properly. The errors are not always
helpful unless you know exactly what caused them.

>>I can't see the point of trying to buffer
> That was a minimal code.
> In the real case, I need to order and filter a query result very
> quickly.

And IBO is not fast enough? I have an application that
requires filtering and sorting on a large table (250,000
records and rising). I just put the correct filter in the
query, and get almost instant results when clicking on the
grid heading or switching the OrderItem value. Someone may
have to correct me, but I think that you can still use the
'Filter' on a prepared query without a loss of performance.
I change my filtering in parameters so don't need to prepare

Another trick to speed seeing results is to use the output
of one query to control a second sub-query. This often helps
performance when trying to get the result from a single
query. You are then only controlling the ordering and
filtering in the sub-query.

I'm not sure that trying to copy a results set to kbmMemTab
will be any faster than tidying up the source of that

>>Use it in a few places myself without any problem.
> could I see a minimal working sample code ?

Would not help you, I just copy a populated query at startup
to fill in a set of site specific information, which is used
from the table. There are better ways to do it now, but it
works so... <g>

Lester Caine
L.S.Caine Electronic Services