clearing of a select filter

B

Bernie Yaeger

If my table contains 10 row, with 3 matching the first select, will all 10
again be evaluated on the next select? Here's what I mean:
irows = dshistd.Tables(0).Select("bipad = '1234'")

If, later, I do this

irows = dshistd.Tables(0).Select("bipad = '5678'")

will I get those that match out of the original 10 or, if I do nothing to
clear the first select, will dshistd.tables(0) only have rows with bipad =
'1234' to offer? If so, what it the correct method of clearing the select?

Thanks for any help.

Bernie Yaeger
 
F

Frank Oquendo

Bernie said:
If my table contains 10 row, with 3 matching the first select, will
all 10 again be evaluated on the next select?

Yes. The Select method returns matching DataRows, it does nothing to
alter the content of the DataTable.

BTW, you might consider using the RowFilter property of the DataTable's
DefaultView member. DefaultView is a DataView and these are very handy
for sorting and filtering.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 
W

William Ryan

Select doesn't clear anything...it only returns what matches if there are
any.
 
B

Bernie Yaeger

Hi Frank,

Tx for your help.

Bernie
Frank Oquendo said:
Yes. The Select method returns matching DataRows, it does nothing to
alter the content of the DataTable.

BTW, you might consider using the RowFilter property of the DataTable's
DefaultView member. DefaultView is a DataView and these are very handy
for sorting and filtering.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 

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

Top