Subject Re: [IBO] IBO_Query, stalling on row fetch final code
Author Peter
Hi Helen

I am actually only trying to find if any products at all are low, if so then the main server is
contacted (Main server out of my control and not firebird) and I simply request stock
blindly with no restock parameters, the main server then hands me what stock it thinks
the particular shop needs and have no choice but to accept it (even if it's wrong or
duplicate which it has been in the past ) .

So my thinking was not to fetch all fields as I don't use them but simple an indicator , an
integer in this case - id which is an auto incrementing key.

A separate datasource is connected to an IBO grid type display to physically show the
stock to the shop managers on a 2 minute refresh timer, this function is also called
within this timer.

So is it still wrong in this case because it appears to work ?

SELECT 1 id FROM PRODUCT WHERE (STOCK_ON_HAND < LOW_WATERMARK)

Gives a result when a low stock item is found - that's all I need or no result if no items
are low in stock.

Rgds

Peter


On 15 Aug 2004 at 22:45, Helen Borrie wrote:

> At 11:57 AM 15/08/2004 +0000, you wrote:
> >Hi Helen
> >
> >Thanks for the reply and suggestion, the way I was searching through
> >the table was silly anyway, why I di it that way I will never know.
> >
> >Below is the code I used.
>
> This is wrong:
> //SELECT 1 id FROM PRODUCT
> // WHERE (STOCK_ON_HAND < LOW_WATERMARK)
>
> To return a "result" it should be
> SELECT 1 FROM PRODUCT
> WHERE (STOCK_ON_HAND < LOW_WATERMARK)
>
> or to return a list of ids where the stocklevel is too low:
>
> SELECT id FROM PRODUCT
> WHERE (STOCK_ON_HAND < LOW_WATERMARK)
>
> Helen
>
>
>
>
______________________________________________________________________
_____
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>
______________________________________________________________________
_____
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
> click here
>
>
>
>
>
>
>
> Yahoo! Groups Links
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/IBObjects/
>
> * To unsubscribe from this group, send an email to:
> IBObjects-unsubscribe@yahoogroups.com
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>


--
=================================================
Peter Chaisty e-Mail: peter@...
-------------------------------------------------
Cyionics Ltd UK
Tel: +44(1)1495 785570
All email is scanned using Norton Antivirus
=================================================


[Non-text portions of this message have been removed]