Apr 20, 2005 #1 C cpopham Well-known member Joined Feb 18, 2004 Messages 273 I want to set a variable equal to the third datacolumn named "myUser" on the first datarow of my datatable named "users". Anyone know how to do this? Thanks, Chester
I want to set a variable equal to the third datacolumn named "myUser" on the first datarow of my datatable named "users". Anyone know how to do this? Thanks, Chester
Apr 20, 2005 #2 M Mister E Well-known member Joined Jul 23, 2004 Messages 136 Assuming your table is coming from a DataSet: Code: DataSet ds = new DataSet(); DataTable dt = ds.Tables["users"]; string myVal = Convert.ToString(dt.Rows[0]["MyUser"]);
Assuming your table is coming from a DataSet: Code: DataSet ds = new DataSet(); DataTable dt = ds.Tables["users"]; string myVal = Convert.ToString(dt.Rows[0]["MyUser"]);