Same Table Structures, with Primary Key

2) create the column with primary key
DataTable ftb = new DataTable();
DataTable stb = new DataTable();
ftb.Columns.Add("Eno", typeof(Int32));
ftb.Columns.Add("Ename", typeof(String));
ftb.PrimaryKey = new DataColumn[] { ftb.Columns["Eno"] };
stb.Columns.Add("Eno", typeof(Int32));
stb.Columns.Add("Ename", typeof(String));
3)write the code


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("Eno", typeof(Int32));
ftb.Columns.Add("Ename", typeof(String));
ftb.PrimaryKey = new DataColumn[] { ftb.Columns["Eno"] };
stb.Columns.Add("Eno", typeof(Int32));
stb.Columns.Add("Ename", typeof(String));
|
0 comments:
Post a Comment