I have thought about writing a generic class to fill any of my classes
from their corresponding database table. It would involve Reflection
and attributes on each of my classes and members. The attributes would
tell this generic class which table and column match this class and
member. But maybe I have avoided it because I don't want my code to
look TOO much like C#. I still want to be able to rewrite it easily
when the next great programming language comes out.
From: Guy Platt [mailto:guy@stripped]
Sent: Wednesday, October 06, 2004 8:30 AM
To: Jordan Sparks
Subject: Re: Better way to get all columns in the DataReader
Thanks for your code sample.
Jordan Sparks said the following wise words on 2004-10-06 5:14 PM:
>Separate your data connection into a separate object. All classes in
>your program then use this one object. So you have only one place in
Actually that is what the example code I sent is from, however since I
have several database tables I wanted to see if there was a better way
of doing the DataReader to Class assignment than the way I am doing it.