title: retrieve value from database and assign it in to string variable C#
body: <p>I want to retrieve value from table. Please guys help me.
  The thing is I want to get that value and check it with a string value.</p>
  
  <p>this code is not working:</p>
  
  <pre><code>SqlCeCommand cmd1 = new SqlCeCommand("SELECT username FROM tmpusername WHERE _id=1", connection);
  
  SqlCeDataReader usernameRdr = null;
  
  usernameRdr = cmd1.ExecuteReader();
  
  while (usernameRdr.Read()){
      string username11 = usernameRdr["username11"].ToString(); 
  }
  </code></pre>