private void Profile_Load(object sender, EventArgs e)
{
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:\Users\jay.desai\Documents\Visual Studio 2008\Projects\Employee Profile\Employee.mdb");
OleDbCommand cmd = new OleDbCommand("select * from Profile where Emp_No=" + txtEmployeeNo.Text + "", con);
cmd.CommandType = CommandType.Text;
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "Profile");
txtEmployeeNo.Text = ds.Tables[0].Rows[0][0].ToString();
txtName.Text = ds.Tables[0].Rows[0][1].ToString();
txtAddress.Text = ds.Tables[0].Rows[0][2].ToString();
txtSex.Text = ds.Tables[0].Rows[0][3].ToString();
txtMobNo.Text = ds.Tables[0].Rows[0][4].ToString();
dtp.Text = ds.Tables[0].Rows[0][5].ToString();
textBox1.Text = ds.Tables[0].Rows[0][6].ToString();
pictureBox1.Image = ds.Tables[0].Rows[0][7];
}
I have created one database in ms access and which have one table called Profile that contain one field Photo has OLE Object Datatype i have mannually inserted one .bmp image in the field now i want to retrieve that image in picturebox but at the run time i got this error "Cannot implicitly convert type 'object' to 'System.Drawing.Image'. An explicit conversion exists (are you missing a cast?)"