A dataset is a fancy collection of datatables. However, if you only have
one table, why create the collection if you don't have to? It's easier to
reference the table directly and makes the code more clear. I'd add it
personally, but it's probably not going to be a life or death difference.
HTH,
Bill
"tim" <(E-Mail Removed)> wrote in message
news:uu%(E-Mail Removed)...
> Hi,
>
> I recently created a generic data access layer so I can use it in many
> applications. It is designed to return datasets, datareaders, scalar
> values... I recently have come across in an application that uses the
data
> access layer needing a datatable instead of a dataset. What I have been
> doing is returning the dataset with only one datatable and then accessing
> the datatable in code (ds.tables[0]). I have been thinking about changing
> my data access layer to return datatables. However with that said, is it
> worth the redesign? Will I see better performance? Do you think it is a
> bad practice to fill a dataset with only one table?
>
> Thanks
>
>
|