I've encountered this error while adding an image to the database. (column's data type is not binary, but image)
error message is attached on this post.
this is my code for adding images to DB.
byte[] ins = GetBinaryFile(txtDIR.Text);
int x = 1;
string comm = "INSERT INTO pictable (picDirectory, pic, caption) values(" +
"'" + txtDIR.Text + "'," +
"'" + ins + "'," +
"'" + txtCaption.Text + "')";
OleDbCommand cm = new OleDbCommand(comm, cn);
cm.Parameters.Add(new OleDbParameter("@picID",
(object)x));
cm.Parameters.Add(new OleDbParameter("@picDirectory",
(object)txtDIR.Text));
cm.Parameters.Add(new OleDbParameter("@pic",
(object)ins));
cm.Parameters.Add(new OleDbParameter("@caption",
(object)txtCaption.Text));
cm.ExecuteNonQuery();