SqlDataReader does not return all records
问题 I am experiencing a problem with ADO.NET SqlDataReader. When I run underlying stored procedure directly in SSMS - it returns 1.7 million of records. When I run a related VB.NET code that fills an ADO.NET DataTable - I also get 1.7 million of records. But when I run a loop to fill a Generic list like this While i_oDataReader.Read m_aFullIDList.Add(i_oDataReader.GetInt32(0)) End While It returns a lot less records and that number can vary. At the end of the loop if I check m_aFullIDList.Count