byte[] imageBt = null; //-------------------- MemoryStream ms = new MemoryStream(); pictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] a = ms.GetBuffer(); ms.Close(); string strcon = "DSN=SHK2"; OdbcConnection cnx = new OdbcConnection(strcon); cnx.Open(); try {string c = "insert into table (matr,nomsc,phot) values ('"+ textBox8.Text+ "','" +textBox1.Text + "',? )"; OdbcCommand cmd = new OdbcCommand(c, cnx); cmd.Parameters.AddWithValue("phot", a); cmd.ExecuteNonQuery(); MessageBox.Show(this, "Croyant ajouté", ); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); }