dataset.merge .NET 1.1

Hey guys

Got trouble with dataset.merge in .NET 1.1 . I did 8 query with the sql database and tried to merge those tables to one dataset. it simply doesn't work. It gets 7 datatable and doesn't merge the 8th one. I wrote a simple for loop and it does the same.

mycode:

DataSet dts = new DataSet();
for (int i = 0; i < 10; i++)
{
DataTable dt = new DataTable();
dt.TableName = "table"+i;
dts.Merge(dt);
}
dataGrid1.DataSource = dts;

Result:

adds table0 till table6 and after tht doesn't add anymore tables. I display the results on a datagrid.

Please help!!! is this a bug Or constraints on DataSet.Merge




Answer this question

dataset.merge .NET 1.1

  • Lalicia Bickerton

    Try putting a breakpoint and checking dts.Tables.Count to see how many actual tables got merged in.

  • David McMahon

    Why don't you just merge the datasets together rather than getting each datatable Or do you have to get the first few datatables and merge them

  • Sudhakara

    thanks guys for ur reply... i i am really p1ssed and not doing it... am now using ref Datatable as parameters :(... don't have time...

    thanks again for help :)



  • vsuneel

    Is it possible that one of the tables contains exact same data that already exists in another DataTable In this case merge will not put duplicated records

  • chris445

    data in all the tables is different for sure!!!

  • dataset.merge .NET 1.1