DataReader or DataSet when pulling multiple recordsets in ASP.NET

Posted by Gern Blandston on Stack Overflow See other posts from Stack Overflow or by Gern Blandston
Published on 2008-10-07T20:32:55Z Indexed on 2010/06/03 13:14 UTC
Read the original article Hit count: 239

I've got an ASP.NET page that has a bunch of controls that need to be populated (e.g. dropdown lists).

I'd like to make a single trip to the db and bring back multiple recordsets instead of making a round-trip for each control.

I could bring back multiple tables in a DataSet, or I could bring back a DataReader and use '.NextResult' to put each result set into a custom business class.

Will I likely see a big enough performance advantage using the DataReader approach, or should I just use the DataSet approach?

Any examples of how you usually handle this would be appreciated.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about Performance