I would change the query and do:
Select count(*) as RecordCount from myTable where ID = 1
Then look at the value of the RecordCount field.
Regards,
Dennis.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 24 August 2001 08:45
To: Multiple recipients of list delphi
Subject: [DUG]: TDataset - Recordcount
If I have a TQuery with a select statement like 'Select ID from myTable
where ID = 1' am I correct in assuming that the best way to verify that
there is a record (or more than 1) with ID = 1 is to test the Recordcount
property?
The reason I ask is that if all I am interested in is the fact that there
are more than 0 records then the Recordcount method seems overkill (as at
some point the entire recordset is navigated which in the case of a large
recordset is time consuming).
...I guess I can override recordcount or implement my own method but before
I do this thought I should double check.
Thanks
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/