Subject Re: [IBO] Retrieving First/Last record from a query.
Author Jason Wharton
> If you don't want use sproc, then use two identical queries with ordering
> ASC and DESC and retrive only the first record of both. In the result you
> will have the first and the last record of the original query. It is fast
if
> you use Maxrows = 1 and autofetchall = false.

Just use TIBOTable for that and call First and Last then.
Be sure to have supporting indexes.
IBO figures out all the rest for you.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com