Board index » delphi » Searching and Sorting in Delphi

Searching and Sorting in Delphi

I'm using Delphi2 with a Paradox backend.  What I would like to do is
to have a way to search for items in a TTable.  I would select the
field to do the searches against using a ComboBox.

I have tried using filters, and I really don't think they work well
again strings.  Using them against numbers works great but not
strings.

Anyone have any suggestion?

John

 

Re:Searching and Sorting in Delphi


Quote
On Mon, 12 May 1997 07:09:59 GMT, se...@pobox.com (John Seitz) wrote:
>I'm using Delphi2 with a Paradox backend.  What I would like to do is
>to have a way to search for items in a TTable.  I would select the
>field to do the searches against using a ComboBox.

>I have tried using filters, and I really don't think they work well
>again strings.  Using them against numbers works great but not
>strings.

>Anyone have any suggestion?

>John

Unless I'm missing something, couldn't you use a Query component, and
build the SQL statement at runtime -
eg

SQL := 'SELECT * FROM tablename WHERE ' + fieldname + ' = ' +
searchvalue;

Max

Other Threads