How can I convert System.Byte[] to Image? (C# window forms)
<p>I have a <code>PictureBox</code> control I want to display an image in it. I saved my images in a MS Access database with this data type: <code>OLE Object</code>.
I find it hard to display it again. Please take a look at my code, and can you guys please devise a solution for it. I got this <code>Exception</code>: </p>

<pre><code>Unable to cast object of type 'System.Byte[]' to type 'System.Drawing.Image'.
</code></pre>

<p>Here's my code:</p>

<pre><code>OleDbCommand cmd = new OleDbCommand("SELECT IMAGE FROM IMAGES WHERE ID = 1", myConn));
            cmd.CommandType = CommandType.Text;
            OleDbDataAdapter da = new OleDbDataAdapter(cmd);
            DataTable dt = new DataTable("dt");
            da.Fill(dt);

            if (dt != null)
            {              
                pictureBox1.Image = (Image)dt.Rows[0]["IMAGE"];
            }
</code></pre>
