title: How to retrieve binary data image from sql server using C#?
body: <p>I am developing a windows form application and I need to save and retrieve an image from an sql database. Actually I am storing the image values in a byte array but while I am retrieving data, I am not able to display the image. I have given my code below:</p>
  
  <pre><code>DataTable dtgetfeedback = Feedback.BOFeedBackRating.GetFeedBackratingcount(setFBRTID);
  
  if (dtgetfeedback.Rows.Count &gt; 0)
  {
      gv_feedbackrating.DataSource = dtgetfeedback;
  }
  else
  {
      gvdtgetdetail.Rows.Clear();
      DataRow drToAdd = gvdtgetdetail.NewRow();
      gvdtgetdetail.Rows.Add(drToAdd);
      gvdtgetdetail.AcceptChanges();
      gv_feedbackrating.DataSource = gvdtgetdetail;
  }
  </code></pre>
  
  <p>Image values are stored bytearray</p>
  
  <p><img src="https://i.stack.imgur.com/KwpBW.jpg" alt="Image values are stored bytearray"> </p>