lost connection to MySql Server during query 2013 by using Blob fields

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Marcel
Posts: 2
Joined: Wed 30 May 2007 17:29

lost connection to MySql Server during query 2013 by using Blob fields

Post by Marcel » Wed 30 May 2007 23:24

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

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 31 May 2007 09:00

Have you looked at our "Pictures" demo project? It works fine with MySQL Server 6.0 alpha. What is the size of the BLOBs you are inserting? Doesn't increasing CommandTimeout help?

Marcel
Posts: 2
Joined: Wed 30 May 2007 17:29

Post by Marcel » Thu 31 May 2007 12:19

I tryed different sizes of pictures (200K - 3MB), Always i got the same error messages. Increasing the commanttimeout.....no success.

Marcel

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 01 Jun 2007 09:00

Alexey wrote:Have you looked at our "Pictures" demo project? It works fine with MySQL Server 6.0 alpha. Doesn't increasing CommandTimeout help?

Post Reply