title: Unable to cast object of type 'system.byte ' to type 'system.iconvertible'
body: <p>I always gets the error </p>
  
  <blockquote>
    <p>unable to cast object of type 'system.byte ' to type 'system.iconvertible" </p>
  </blockquote>
  
  <p>with my code of retrieving image form DB to a picturebox through a 'SelectedIndexChanged' event of a listview.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>foreach (ListViewItem LVI in lvwInventory.SelectedItems)
  {
      ////CONNECTION STRING TO THE DATABASE (USED FOR SAVING/UPLOADING IMAGE)
      //System.Data.OleDb.OleDbConnection con = new System.Data.OleDb.OleDbConnection("Provider=microsoft.jet.oledb.4.0; data source=..\\dbMyDVDOrganizer.mdb");
      con.Open();
      //OLEDB COMMAND FOR RETRIEVING IMAGE FROM THE DATABASE
      System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand("SELECT DVDImage FROM tblDVDInventory WHERE ItemCode='" + lvwInventory.SelectedItems[0].Text + "'");
      cmd.Connection = con;
      cmd.CommandType = CommandType.Text;
      System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter(cmd);
      DataSet ds = new DataSet();
      da.Fill(ds);
      Byte bits = Convert.ToByte(ds.Tables[0].Rows[0][0]);
      MemoryStream memoryBits = new MemoryStream(bits);
      Bitmap bitmap = new Bitmap(memoryBits);
      //BITMAP HAS THE IMAGE NOW.
      pctImage.Image = bitmap;
  }
  </code></pre>
  
  <p>Where did I make a mistake?</p>