C
Craig Lister
Newish to c#, so go easy...
I have a data class that does all my database work..
One method is 'getData'. I pass it a string which contains the SQL string,
and it returns me a SqlDataReader. However, this means that where ever I
call this class from, I need to include 'using System.Data.SqlClient'.
I'd prefer to return something else, and it looks like a Collection is the
right idea... It looks like I could populate this object with my rows and
columns, and then pass it back, instead of the dataset object.
Is this possible?
How would I write my dataset to a collection, and return it instead ?
Thanks,
Craig
I have a data class that does all my database work..
One method is 'getData'. I pass it a string which contains the SQL string,
and it returns me a SqlDataReader. However, this means that where ever I
call this class from, I need to include 'using System.Data.SqlClient'.
I'd prefer to return something else, and it looks like a Collection is the
right idea... It looks like I could populate this object with my rows and
columns, and then pass it back, instead of the dataset object.
Is this possible?
How would I write my dataset to a collection, and return it instead ?
Thanks,
Craig