search value in table

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
johnkuiper
Posts: 6
Joined: Tue 06 Nov 2007 17:17

search value in table

Post by johnkuiper » Mon 07 Jan 2008 10:19

As far as I know, searching a particulair value in a table you have to do serveral things like using MyQuery, put an SQL with a parameter in it, set the value of the parameter, open MyQuery, check the recordcount and close MyQuery.
Is there a simple way to accomplish this procedure :?:

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

Post by Antaeus » Tue 08 Jan 2008 09:48

There is no simpler way to do this. The only hint I have is to use the SELECT COUNT(*) FROM table WHERE ... command instead requesting all records and checking record count with DataSet.RecordCount.

Post Reply