Merge Case 4: Common Column, with Primary Key

2) create the column with primary key
DataTable ftb = new DataTable();
DataTable stb = new DataTable();
ftb.Columns.Add("Sno", typeof(Int32));
ftb.Columns.Add("Sname", typeof(String));
ftb.PrimaryKey = new DataColumn[] { ftb.Columns["Sno"] };
stb.Columns.Add("Sno", typeof(Int32));
stb.Columns.Add("Smark", typeof(String));

4)Run the program


In the strongly typed DataSet, Table1 can be used as a sample table that has primary keys
defined on it.2) create the column with primary key
DataTable ftb = new DataTable();
DataTable stb = new DataTable();
ftb.Columns.Add("Sno", typeof(Int32));
ftb.Columns.Add("Sname", typeof(String));
ftb.PrimaryKey = new DataColumn[] { ftb.Columns["Sno"] };
stb.Columns.Add("Sno", typeof(Int32));
stb.Columns.Add("Smark", typeof(String));
using System; |
5)click the merge button
0 comments:
Post a Comment