I am trying to DataBind a PictureBox with a stored BLOB image in a DB2 database.
I am able to bind the image using a Binding object as seen in the code below.
My problem is the datasource HasChanged() property is always true even if I don't change the image?
Any idea as to how I can fix this?
Thanks for any help.
Binding binding = new Binding("Image", myRecord.Tables, "IMAGE", true);
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "JPEG files|*.jpg|Bitmap files|*.bmp|GIF files|*.gif|All files|*";
DialogResult mResult = openFileDialog1.ShowDialog(this);
if (mResult == DialogResult.OK)
myImageFile = openFileDialog1.FileName;
this.pictureBox1.Image = Image.FromFile(myImageFile);