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

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

Postby 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
Marcel
 
Posts: 2
Joined: Wed 30 May 2007 17:29

Postby 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?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby 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
Marcel
 
Posts: 2
Joined: Wed 30 May 2007 17:29

Postby 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?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL