What is the difference and which is more efficient if you know your datatypes already?
Printable View
What is the difference and which is more efficient if you know your datatypes already?
MSDN:
Quote:
You use the Read method of the DataReader object to obtain a row from the results of the query. You can access each column of the returned row by passing the name or ordinal reference of the column to the DataReader. However, for best performance, the DataReader provides a series of methods that allow you to access column values in their native data types (GetDateTime, GetDouble, GetGuid, GetInt32, and so on).
Sweet! That is exactly what I was looking for. Thanks.