G
Guest
I've just filled a dataset with 1 row from a table in my database
I want to get the value of one of the fields
I'm using
string atLastMyValue
DataSet ds
DataTable dt
DataRow dr; in myTable.Rows
DataColumn dc
dt = ds.Tables[0]
dr = dt.Rows[0]
dc = dt.Columns["myFieldName"]
atLastMyValue = dr[dc].ToString()
Is there a simpler way to reference the field?
I want to get the value of one of the fields
I'm using
string atLastMyValue
DataSet ds
DataTable dt
DataRow dr; in myTable.Rows
DataColumn dc
dt = ds.Tables[0]
dr = dt.Rows[0]
dc = dt.Columns["myFieldName"]
atLastMyValue = dr[dc].ToString()
Is there a simpler way to reference the field?