Shaitan00 Posted August 12, 2003 Posted August 12, 2003 Given a Dataset [ds] which contains 1 row and 3 columns [username, Password, Level]. ds: Table[0]: Username Password Level Name Pass 2 I need to store the value of Level [from ds] into a created variable [savedLevel], currently I am trying via this method: savedLevel = ds.Tables[0].Columns[2].ToString(); However this stores the string �Level� into savedLevel and not the actual value [2] required. Can someone help point me in the right direction? Quote
BrianHansen Posted August 12, 2003 Posted August 12, 2003 Try this (it's c#): DataTable dt = ds.Tables[0]; savedLevel = dt.Rows[0]["Level"].ToString(); This will return row 0 from the 3rd column (Level). Hope this helped. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.