title: Select from dataset where data in dataset matches user input
body: <p>I am trying to query or match user input against a <code>dataset</code> using a <code>DataTable</code>:</p>
  
  <p>I am populating the dataset from a stored procedure which selects only a single column from a single table: Example: UserID Column. **I am not selecting the entire content of the table.*</p>
  
  <pre><code>public static DataSet LoadProfile()
  {
      SqlCommand cmdSQL = new SqlCommand("usp_LoadProfile", ConnectDatabase);
      cmdSQL.CommandType = CommandType.StoredProcedure;
  
      SqlDataAdapter daSQL = new SqlDataAdapter(cmdSQL);
      DataSet ds = new DataSet();
      daSQL.Fill(ds);
  
      try
      {
          ConnectDatabase.Open();
          cmdSQL.ExecuteNonQuery();
      }
      catch(Exception)
      {
          StatusMsg = ex.Message;
      }
      finally
      {
          ConnectDatabase.Close();
          cmdSQL.Parameters.Clear();
          cmdSQL.Dispose();
      }
      return ds;
  }
  </code></pre>
  
  <p>I have the following method called in the form load event: I need to populate the dataset on from load.</p>
  
  <pre><code>public static DataTable LoadData()
  {
      DataSet dsView = new DataSet();
      dsView = LoadProfile();
      DataTable tblExample = dsView.Tables["Example"];
  
      return tblExample;
  }
  </code></pre>
  
  <p>Finally what I would like to do is match the user entry from the <code>DataTable</code>.</p>
  
  <p>I have this in button event:</p>
  
  <pre><code>DataRow[] results;
  results = LoadData().Select(txtExample.Text);
  </code></pre>
  
  <p>Beyond this point, I could use a for loop but there is only one record for each person.</p>
  
  <p>I am trying to match the user entry with the dataset via the datatable.</p>