C
Colin Basterfield
Hi,
As I've decided to use my own custom collections to get data from my DB
backend, to a web service, and then to my client frontend, I was wondering
if there is a way to directly fill the objects of my collection without
first having to load into a DataSet.
Could I override the SqlDataAdapter.Fill method so instead of
dbAdapter.Fill(dataSet, "site"), I have dbAdapter.Fill(myList, "site"), and
then the Fill would simply map the fields of each row onto the object fields
followed by adding them to the list?
What about SqlDataReader, does that give me any more options?
Is this a reasonable idea, or should I get my coat?
Thanks in advance
Colin B
As I've decided to use my own custom collections to get data from my DB
backend, to a web service, and then to my client frontend, I was wondering
if there is a way to directly fill the objects of my collection without
first having to load into a DataSet.
Could I override the SqlDataAdapter.Fill method so instead of
dbAdapter.Fill(dataSet, "site"), I have dbAdapter.Fill(myList, "site"), and
then the Fill would simply map the fields of each row onto the object fields
followed by adding them to the list?
What about SqlDataReader, does that give me any more options?
Is this a reasonable idea, or should I get my coat?
Thanks in advance
Colin B