Hey All,
I have built a Strongly Typed DAL for a system I am working on and I am trying to add filtered searching to it.
Example:
Before I put the Strongly Typed dataset in place I had a class file that made all the calls to the database/stored procedures. To accomplish this I simply added to the SQL String:
WHERE " & FieldToSearch & " LIKE '%' + @SearchString + '%'"
This worked exactly how I needed it to. But now that I have a strongly typed datatable, I am finding the only way to do this with that table is by DataView.RowFiltering, which seems taxing on the database considering I have to pull back 10+ rows, populate a dataset and only present 3 or 4 to the user from that dataset.
Any ideas on how to best handle these kinds of searches?
Thanks,
-Matthew