Subject | Record count alternative |
---|---|
Author | Robert martin |
Post date | 2006-02-06T22:44:48Z |
Hi
I know that record counts are a slow process in FB and are to be
avoided. I am doing an ordering app where the results of a (sometimes)
complex query are displayed. The client wants it to automatically order
the item if only one result is returned, which is reasonable. However
to determine if there is only one result I think I need to either do a
a) Query.RecordCount
b) Move to the next record, if EOF than only one returned, move back again.
Is there a better way? I take it b would be best for performance but
is not exactly intuitive.
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
I know that record counts are a slow process in FB and are to be
avoided. I am doing an ordering app where the results of a (sometimes)
complex query are displayed. The client wants it to automatically order
the item if only one result is returned, which is reasonable. However
to determine if there is only one result I think I need to either do a
a) Query.RecordCount
b) Move to the next record, if EOF than only one returned, move back again.
Is there a better way? I take it b would be best for performance but
is not exactly intuitive.
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd