No, the datareader will not return the account first. However, if you need to do this, use two queries that return multiple result sets.
for example in SQL Server:
sql = "Choose count (*) from A; select * from A;"
Iterate result sets. Use the datareader in the second result set.
The database server should be able to do this fairly quickly if it uses the appropriate indexes.
source share