title: retrieving special characters from database to C#
body: <p>i have a data in my database <code>'A Plus 18" Stand Fan'</code> without the single quote. i used nvarchar to save the data as it is, but when i try to retrieve it from the database, the data is returning <code>'A Plus 18\" Stand Fan'</code>. I tried using <code>WebUtility.HtmlDecode</code> and <code>HtmlUtility.Html.Decode</code> also <code>WebUtility.UrlDecode</code>.  Can someone help me? thanks!</p>
  
  <p>here is my code where i read the data from the database for comparison. the "Model" is the one i need to fix </p>
  
  <pre><code>for (int y = 0; y &lt; dt.Rows.Count; y++)
          {
              model = dt.Rows[y]["ItemModel"].ToString();
              string companys = "";
  
              companys = dt.Rows[y]["Company"].ToString();
  
  
  
              //getAMS(model, quan);
              Utility a = new Utility();
              string com = a.PO();
              SqlConnection con = new SqlConnection(com);
              SqlCommand read = con.CreateCommand();
              SqlDataReader reader = null;
              string stat = "Delivered";
  
              string mod = "SELECT SUM(Quantity) as Quantity from vConsumables_Balance where Model ='" + model + "' AND Company = '" + companys + "' AND Status = 'Delivered'";
  
              try
              {
                  con.Open();
                  read.CommandText = mod;
                  reader = read.ExecuteReader();
              }
              catch (System.Exception)
              {
                  Console.WriteLine("Error");
              }
  
              while (reader.Read())
              {
  
                      quan = reader.GetDecimal(0).ToString();
  
  
  
              }
  </code></pre>