2
Reply

Got confused with using Dataset nad Datatable.....which is best opted for use in asp.net using C#

vineeth

vineeth

16y
6.8k
0
Reply

    A dataset contains morethan one datatables. datatable is lightweight than dataset,and it can be used as per requirement.

    dataset contains with datatables,relations,constraints etc and comes with many methods.but datatable in lightweight then dataset but here we cannot get all the benefits that we find in dataset.on the otherhand data table takes a vital role inorder to create hardcoded records.

    e.g suppose i want to display some records in gridview control by hardcoding. here we can use datatable.

    if our requirement is simply for displaying records so why we will go for dataset where it wll be faster with datatable over dataset.

    It depends on your applications requirement and also the design rationale that you have adopted.

    For more interview questions on ADO.NET check out ADO.NET questions