Marian,
A complete sample, it creates a datatable with that the update using ADONET
is standard handling.
\\\needs a picturebox on a form
private void Form1_Load(object sender, System.EventArgs e)
{
OpenFileDialog fo = new OpenFileDialog();
if (fo.ShowDialog() == DialogResult.OK)
{
System.IO.FileStream fs = new System.IO.FileStream
(fo.FileName, System.IO.FileMode.Open);
System.IO.BinaryReader br = new System.IO.BinaryReader(fs);
Byte[] abyt = br.ReadBytes((int)fs.Length);
br.Close();
System.Data.DataTable dt = new System.Data.DataTable();
dt.Columns.Add("image",Type.GetType("System.Byte[]"));
dt.Rows.Add(dt.NewRow());
dt.Rows[0]["image"] = abyt;
Byte[] abyt2 = (byte[]) dt.Rows[0][0];
System.IO.MemoryStream ms2 = new System.IO.MemoryStream(abyt2);
pictureBox1.Image = Image.FromStream(ms2);
}
}
}
I hope this helps a little bit?
Cor