DataTable search alternatives?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I have a DataTable in a Windows Forms project that I would like to use a
Select statement. The problem is, I'd like to be able to do wildcard
searches (including single charcater searches).

What are my alternatives? I'd rather not have to go back to the database,
unless that is the best way. The DataTable was a performance enhancement.

Thanks,
pagates
 
Hello pagates,

Why not iterate through the DataTable manually, looking for string that conforms
the Regexp pattern?
p> Hi All,
p> I have a DataTable in a Windows Forms project that I would like to
p> use a Select statement. The problem is, I'd like to be able to do
p> wildcard searches (including single charcater searches).
p>
p> What are my alternatives? I'd rather not have to go back to the
p> database, unless that is the best way. The DataTable was a
p> performance enhancement.
p>
p> Thanks,
p> pagates
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Hi Michael,

That is certainly one possibility. However, I was trying to avoid doing
that, as there could be tens of thousands of rows in the DataTable. The
reason for the DataTable was to simplify the process and enhance the
performance.

What I may have to do, if nobody has a better idea, is to combine this with
an answer I got elsewhere, which was to change the search criteria to break
apart the tags (for instance, if aaa*bbb is what I want, then change it to
aaa* and *bbb). Then, with those results, apply the regex filtering you
suggested.

Thanks for the help,
PAGates
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top