Results 1 to 4 of 4

Thread: Compare 2 datasets

  1. #1

    Thread Starter
    Member
    Join Date
    May 2007
    Posts
    32

    Compare 2 datasets

    Hello,

    i have to develop an application to compare a dataset (with around 1000s of records)with a database table which has almost more than 4 million records.

    and if the dataset has matches in the table i will mark them as processed. is there any way to achive this .

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Compare 2 datasets

    Moved from the CodeBank

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Compare 2 datasets

    Just loop through them row by row. You'll create two loops, one to iterate through the largest dataset and the second to iterate through the smaller one.

    Then just compare columns. If the column matches, compare the values. If all values from the smaller one match, mark it however you'd like.

    I would suggest picking up a C# book as well. There may be a more built in way of doing this but I don't have much experience with a DataSet and this way should do just fine.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  4. #4

    Thread Starter
    Member
    Join Date
    May 2007
    Posts
    32

    Re: Compare 2 datasets

    well the manual way ...i have done it already.. and it takes some time to process... i just want something much more easier..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width