How many records did i find?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

How many records did i find?

Post by kaffeburk » Fri 06 Apr 2007 09:45

Im using tmyquery:

I either found one ore zero, but how do i know this? The EOF and the BOF are both true in both cases. How do i find out if a search resulted in notting? Even more nice would be to know how many records i found, is this possible?

Regards, Pär

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 06 Apr 2007 12:18

Try checking the RecordCount property of TMyQuery, TMyTable, etc.

kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Post by kaffeburk » Fri 06 Apr 2007 12:39

Antaeus wrote:Try checking the RecordCount property of TMyQuery, TMyTable, etc.
Thanks, it works. Got confuced because the help file states:

As implemented in TDataSet, RecordCount is always -1.

So i thougt is was not implemented...

Post Reply