Compare Idatareader values and write those who doesn't match

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • parshupooja
    New Member
    • Jun 2007
    • 159

    Compare Idatareader values and write those who doesn't match

    Hey All,

    I have 2 IDatareaders. forex:
    Idatareader r
    One
    Two
    Three
    Four
    Idatareader a
    One
    Two
    Three
    Four
    five
    six

    both are returning one column and many rows. I want to compare values of both datareader and present result out those who does not match. for ex: in this case it will be
    five
    six

    any idea?
    thanks
  • int08h
    New Member
    • Apr 2007
    • 28

    #2
    IDataReader only implements IEnumerable but not IList, so comparison is not fully supported, a way is to get all data out and make 2 lists, comparison on list is easy

    Comment

    Working...