Subject Re: [IBO] IBO_Query, stalling on row fetch
Author Helen Borrie
Hello Peter,

At 11:32 AM 14/08/2004 +0000, you wrote:
>Hi
>
>I have been having some prpblems very rarely for a time with a
>dialogue box appearing saying
>
>
>Fetching Query Results
> row #10
>
>and an ABort button

You're using a callback on a TIB_Cursor and that's the standard callback
message that comes through when your query is slow for some reason, i.e. it
has taken one click of the callbackInt to fetch 10 rows. There will be an
explanation for that, not related to this query, but to memory exhaustion
or network overload or both. Don't want to go there right now, but ---

>The Ibo_query is a simple read only query simply fetching rows of
>interest.

There's no way you need to do this on the client and you don't need a SP,
either. A really simple statement will do it:

select 1 from YourStockTable
where <selection criteria>
...
YourQuery.First;
Re_order := YourQuery.Fields[0].Value = 1;

If you've got a "Reorder" field in the table that you want to update,
again, you don't need to pull the set over the client:

update YourStockTable
set Re_order = 'T'
where STOCK_ON_HAND < LOW_WATERMARK
and <other selection criteria, parameterised>

Helen