See
5/24/2006 ENTRY
http://sholliday.spaces.live.com/blog/
Custom Objects/Collections and Tiered Development
In the code, I use an IDataReader .. the "Get" methods, to populate objects
and collections.
You should use the explicit datatype if you know it.
GetString
GetDecimal
GetDateTime
If you' dont know it, you can use the generic GetValue ~TO FIGURE OUT THE
DATATYPE, but not as the final solution.
"Damian" <da**********@yahoo.co.ukwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
I may be going a bit crazy, but could someone please give me a
definitve way to poplate an object from an SqlDataReader. Do i use
DataReader.GetString(0) with check for dbnull or
Convert.ToString(dr[0]) or is there a better way?