Skip to content
Loading
  • Krishna Rajput Singh
    0
    Hi below links helpful for you......
    http://stackoverflow.com/questions/11710760/how-can-i-convert-a-datatable-to-a-related-dataset
    http://forums.asp.net/t/772845.aspx?convert+DataTable+to+DataSet+
    https://social.msdn.microsoft.com/Forums/en-US/d53f0bc9-2eac-4d01-a765-67f270af358a/convert-datatable-to-dataset-in-c-with-examples?forum=adodotnetdataproviders
    0
  • Lokesh Kumar
    0
    Its very easy
    Please use this.
    Datatable dtb =new DataTable();
    Dataset ds=new DataSet();
    ds.Tables.Add(dtb);
    if you have more than 1 tables then you can add tables in the dataset
    DataTable dt1 = new DataTable();
    DataTable dt2 = new DataTable();
    DataTable dt3 = new DataTable();
    DataSet ds = new DataSet();
    ds.Tables.Add(dt1);
    ds.Tables.Add(dt2);
    ds.Tables.Add(dt3);
    I hope this is helpful
    0