>Is there any easy way to know how many records a select query has returned.
>The problem I have is I was doing a while on EOF but if only one record is
>returned the EOF is true and my while code does not execute.

I believe it's possible (driver related) for a result set to be returned with the 
cursor
not at the first record. If this is the case there are several solutions.

1. Use RecordCount.  This is not necessarily calculated until all results have been
retrieved.  You can retrieve all using 'Open; Last; First;' or 'Open; FetchAll;'
2. Try 'Open; First;' to see if the cursor was not at the first record.  Another test 
is
   if not(EOF and BOF) then ... which tests for an empty resultset.

I haven't used these often since Most of my multiple record retrievals are using 
FetchAll
to compress network usage anyway.

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to