Tech Off Thread

2 posts

Trying to be a better developer : Question on dataset

Back to Forum: Tech Off
  • User profile image
    pwzeus

    Objective: Populate Grid from database


    1. I am always giong to use one table so does it make sence to use data table in stead of data set. I can banch mark this but i would like to know your opinion. I have always used dataset so if i use data table now then may be in future i will get stuck with some constrain.

    2. is it safe to assume that datatable will give me all those functionalities and properties as dataset.

    3. Someone suggested i should use XML files instead, so like when a result set comes back from my database i should carete an xml file and bind that to my grid. As I have not done this before I am not raelly up for it but if i do use it do you think it will be a big performence difference?

    4. datareader at all ? as i will be doing inserting , updating deleting


    If u r further intrested in my solution then read below:

    main objective : display reports in the grid based on selection criteria

    report can be 10,000 rows

    Currently I m using ASP.NET GridView contrl with AJAX and backend is SQL Server.

    On page load I will display all the record in gridview and then filter that on client side.

    i will appriciate any suggestions or critics.

    all i m doing is trying to be a better developer

    Peace

  • User profile image
    Maddus Mattus

    1. DataTables are a part of a DataSet. You can make a typed dataset and fill it with data from the Sql Table using TableAdapters. This can be done in design mode.

    2. See above.

    3. As for writing an XML file. Why do that? Your Sql Table is your datastore not an XML file.

    4. DataReader can only be used to read data. Hence the name.

    My advice: Use a typed dataset (xsd) with table adapters.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.