Join DataTable
Trabalhar com C#.NET tem as suas vantagens.
public static DataTable JoinDataTable(DataTable oDataTable1, DataTable oDataTable2) { if (oDataTable1 == null || oDataTable2 == null) return null; DataTable odtt = oDataTable1.Copy(); foreach (DataRow row in oDataTable2.Rows) { try { DataRow r = odtt.NewRow(); r.ItemArray = row.ItemArray; odtt.Rows.Add(r); } catch (Exception e) //if the schema are not equal { string x = e.Message; break; } } return odtt; } |
Subscribe ecode10.com
Receive our latest updates about programming languages, software, database, books, ebooks, classes, jobs and more.
You can cancel anytime.
Log In