Hi
I have probleme when i try to save Blob fields with the ExecuteNpnQuery Methode.
private void StoreBlob2DataBase_AsInsert(byte[] content)
{
mySqlConnection1.Open();
try
{
// insert new entry into table
MySqlCommand insert = new MySqlCommand("INSERT INTO item_picture (Picture) VALUES (@picture)", mySqlConnection1);
MySqlParameter imageParameter = insert.Parameters.Add("@picture", MySqlType.Blob);
//imageParameter.Value = content;
imageParameter.MySqlValue = content;
imageParameter.Size = content.Length;
//insert.CommandTimeout = 200;
insert.ExecuteNonQuery();
}
catch (MySqlException myException)
{
MessageBox.Show("Message: " + myException.Message + "\n" +
"Error-Code " + myException.Code.ToString) + "\n");
}
finally
{
mySqlConnection1.Close();
}
}
MySQL Server 6.0
Table type InnoDB
MS Vista / VS2005
CoreLab 4.0
Can someone help???
Thanks
Marcel