0
Hi.
There is no rows corresponding to column "Column52" in that dataset. Thats why its throwing error. There should be rows for that column in your dataset for below code to work.
0
Object cannot be cast from DBNull to other types.
Exception error occur
ds.Tables[k].Columns.Add("Column52");
ds.Tables["Source" + c].AcceptChanges();
for (int f = 0; f < ds.Tables[k].Rows.Count; f++)
{
ds.Tables[k].Rows[f]["Column52"] =ds.Tables[k].Compute("MAX(Column52)","");
//double maxval = Convert.ToDouble((ds.Tables[k].Compute("MAX(Column52)", "")));
(also try this one)
}
0
<h4><a data-userid="9088f9" href="http://www.c-sharpcorner.com/members/midhun-tp">Midhun T P</a></h4>S midhun
0
Hi,
Did you mean the minimum or maximum values in a column of dataset?