title: Retrieve BLOB file
body: <p>I upload BLOB files in my SQL database. I create Dynamic Hyperlink redirecting to my downloading.aspx.cs , to download the files .</p>
  
  <p>When I click on it , the only thing I retrieve is something like that : </p>
  
  <pre><code>*����JFIF,,��ExifMM*�   ���(1�2;%+&gt;P?`���7��i��%��NIKON CORPORATIONNIKON D3-��'-��'Adobe Photoshop CS4 Macintosh2010:11:19 21:53:25 9�I�@d!ddGddd+�K�r� (��Ƃ�Έ"�'@�0221�֐����� ���� � ��,��42��42��42�0100����Р�d����J����R�b����   � ��Z @( 2010:11:19 20:44:392010:11:19 20:44:39 � ASCII  R030100��(�HH����JFIFHH��Adobe_CM��Adobed����* 
  </code></pre>
  
  <p>This is my Page_Load code in this downloading.aspx : </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      string filename = Request["file"].ToString();
      var conString = ConfigurationManager.ConnectionStrings["LocalSqlServer"];
      string strConnString = conString.ConnectionString;
      SqlConnection dbConnection = new SqlConnection(strConnString);
      dynamic queryString = ("SELECT Data FROM Files WHERE Name = '" + filename + "'");
      SqlCommand theCommand = new SqlCommand(queryString, dbConnection);
      dbConnection.Open();
      SqlDataReader reader = theCommand.ExecuteReader();
  
      if (reader.Read() &amp;&amp; reader != null)
      {
          Byte[] bytes;
          bytes = Encoding.UTF8.GetBytes(String.Empty);
          bytes = (Byte[])reader["Data"];
          Response.BinaryWrite(bytes);
  
          reader.Close();
      }
  
      dbConnection.Close();
  }
  </code></pre>
  
  <p>Can someone tell me why? Thank you.</p>