I have a query for the SQLCE database like
select mobileNumber from customers where balance > 10000
Till now, I was looping over the SqlCeResultSet like
while (resultSet.Read())
{
mobileNumberList.Add(resultSet.GetValue(0));
}
So I want to get the list of mobile numbers in a single fetch may be as a list. How do i do that? Because the getting in a single fetch will be faster, right?
UPDATE
Few things I read after reading the answers:
SqlDataReader vs SqlDataAdapter