title: Conversion failed when converting from a string to a uniqueidentifier
body: <p>When I run my code on debug I get this error:</p>
  
  <blockquote>
    <p>Conversion failed when converting from a string to a uniqueidentifier</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>public class UserObject
  {
      private string m_name = string.Empty;
  
      public UserObject(string id)
      {
      #region Internal Logic
          try
          {
              using (SqlConnection cn = new SqlConnection(SiteConfig.ConnectionString))
              {
                  string sSQL = "SELECT [UserName] FROM [aspnet_users] WHERE [UserID] = @UserID";
                  using (SqlCommand cm = new SqlCommand(sSQL, cn))
                  {
                      cm.Parameters.AddWithValue("@UserID", id);
                      cn.Open();
                      using (SqlDataReader rd = cm.ExecuteReader())
                      {
                          while (rd.Read())
                          {
                              m_name = rd[0].ToString();
                          }
                          rd.Close();
                      }
                      cn.Close();
                  }
              }
          }
          catch (Exception ex)
          {
  
          }
      #endregion Internal logic
      }
  }
  </code></pre>