dataset可以直接合并表的啊!
你也可以用select .. into啊

解决方案 »

  1.   

    it is better to do it in the databaseinsert into table3 (col1, col2, ..) select col3, col4 from table1 inner join tabel2 on table1.id = table2.idor if you insist, create a third DataTable, programmatically add new rows to this DataTable, then use your DataAdapter's Update methodDataRow dr = DataTable3.NewRow();
    dr["co11"]  = DataTable1.Rows[0]["col3"];
    dr["co11"]  = DataTable2.Rows[0]["col4"];
    DataTable3.Rows.Add(dr);
    ...OleDbCommandBuilder cb = new OleDbCommandBuilder(DataAdapte1);//make sure your table3 has a primary key 
    DataAdapte1.Update(DataTable3);
    DataTable3.AcceptChanges();
      

  2.   

    Consider the third table as a view is esier!