SqlDataReader performance tips

Some quick and easy performance tips for ADO.NET, courtesy of Adam Machanic.

He talks about calling GetOrdinal before looping through a DataReader. We do the same thing with classic ADO in Delphi when we need to optimize the scrolling through a recordset.

The other tip is to use static cases instead of Get

Roman Rehak commented with the tip to always close the explicitly connection when you are done with the reader.</datatype>