karthimca07
New member
- Joined
- Nov 24, 2011
- Messages
- 1
- Programming Experience
- 1-3
Hi,
I have a dataset of two datatables with parent and child relation defined.
Now i want to add a column into child table from parent table?
look at the below code i tried. i got the error saying column name not found
Please help me
I have a dataset of two datatables with parent and child relation defined.
Now i want to add a column into child table from parent table?
look at the below code i tried. i got the error saying column name not found
Please help me
VB.NET:
Dim DtCompany As New DataTable()
DtCompany = db.GET_TABLE("select mc_id,mc_name from med_Company")
DtCompany.DataSet.Tables.Remove(DtCompany)
DtCompany.TableName = "Comp"
DsTrans.Tables.Add(DtCompany)
Dim RelComp As New DataRelation("COMPREL", DtCompany.Columns("mc_id"), DsTrans.Tables(0).Columns("mss_compid"))
DsTrans.Tables("table").Columns.Add("Company", GetType(String), "Comp.mc_name")
grdDetails.DataSource = DsTrans