My dataset contains two tables i need to get division of FirstTable.Row2/SecondTable.Row5
views:
41answers:
1
A:
Assuming the types are the same and division is acceptable... and I am understanding your question:
DataSet ds = GetMyData();
// You should check here for there being at least 2 tables in the DataSet
// and that Table 1 has at least 2 rows and Table 2 has at least 5 rows.
var result =
ds.Tables[0].Rows[1]["YourField"] / ds.Tables[1].Rows[4]["YourOtherField"];
Kelsey
2010-05-12 18:38:57