QueryAllRecords=False && RecordCount

vwilhelm

Member
Hi,

When I try to get the recordcount of a TOracleDataset with QueryAllRecords=False I always get 1. If there is a DBGrid connected to the DataSet, then the RecordCount is like the number of lines of the DBGrid. How can I get the information that more than one record was fetched without further record buffers allocated ?

Greetings
Volker Wilhelm
 
Setting CountAllRecords to True executes an sql-statement to get the number of records, which I want to avoid. Are there other ways to get the number of records after the initial fetch? How about adding a property ResultsetState, which indicates whether there are no records, one record or many records to fetch? Our class library needs excactly this information.

Greetings
Volker Wilhelm
Compu-Orga GmbH
 
To find out how many records a query will return, you must either finish the query (default behavior: QueryAllRecords = True) or fire a corresponding count query (QueryAllRecords = False, CountAllRecords = True). The CountQueryHits function performs the same count query.

------------------
Marco Kalter
Allround Automations
 
Back
Top