Need help understanding DataRow
I have:
command.CommandText = âSELECT UserName from Users WHERE UserID = â = userID
Executing this command returns one table with one column with one row. What is the syntax for getting that value into a variable? I can get the information into a dataSet but I canât get it out. Should I be using a dataSet for this operation?
The rest of the code so far:
SqlDataAdapter dataAdapter = new SqlDataAdapter();
dataAdapter.SelectCommand = command;
dataAdapter.TableMappings.Add("Table", "Users");
dataSet = new DataSet();
dataAdapter.Fill(dataSet);
|