I\'ve tried to find solution for this problem twice before, but unfortunately those answers haven\'t provided permanent fix, so here I am, giving it another try.
I have
Basically you read all record in SqlDataReader with select query I suggest you to add order by in your query and it sort all records in Acceding order and they also read in acceding order in SqlDataReader.
I also face this problem in my last project I have read more than 2 million records from database with unique id serialNo but this records are not come in sequence after 1000 records it jumps to 21, 00, 263th record and all records are come in wrong sequence.
Then I use (order by serialNo) this query and my problem is solved you not need to do anything extra only put order by in your select query and it will work for you
I hope this helps for you.