Error at Update time

Error at Update time

Postby Amish » Sat 09 Feb 2008 08:51

Hi Alexey...

I am having some problem with Update command of Mysqldataadapter of Mydirect.Net.

I am updating a row in which a field contains 3 mb data.

Data type of this field is LONGTEXT.

Now when i insert this row,It gives error message as below.

"Lost connection to MySQL server during query"

CoreLab.MySql.MySqlException

errorcode:2013

I searched and changed some variables in Mysql server as below.

wait_timeout
max_allowed_packet
write_timeOut
read_timeout

I set all this field to proper amount of time.

--->I saw a property of Mysqladapter named "UpdateBatchtime".Do i need to change this property???

Thanks
Amish
Amish
 
Posts: 20
Joined: Thu 05 Apr 2007 12:04
Location: INDIA

Postby Amish » Sat 09 Feb 2008 11:03

Sorry Property Name for dataadapter is "UpdateBatchSize" above...
Amish
 
Posts: 20
Joined: Thu 05 Apr 2007 12:04
Location: INDIA

Postby Alexey.mdr » Mon 11 Feb 2008 12:40

Hello Amish,

Try to increase the CommandTimeout property. This should solve the problem.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby Amish » Tue 12 Feb 2008 10:23

Hi..

I tried using MysqlCommand.commandtimeout property as you suggested but it didnt work....

Below is the stack trace which gives exception when i use command.executenonquery


at CoreLab.MySql.a5.d(Byte[] A_0, Int32 A_1, Int32 A_2)
at CoreLab.MySql.a5.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at CoreLab.MySql.b.a(at A_0, Byte[] A_1, Int32 A_2, Boolean A_3)
at CoreLab.MySql.b.a(Byte[] A_0, Int32 A_1, Boolean A_2)
at CoreLab.MySql.ab.e()
at CoreLab.MySql.ab.o()
at CoreLab.MySql.MySqlCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
at CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at CoreLab.Common.DbCommandBase.ExecuteNonQuery()

Hope this can help you suggesting solution

Thanks
Amish
Amish
 
Posts: 20
Joined: Thu 05 Apr 2007 12:04
Location: INDIA

Postby Alexey.mdr » Tue 12 Feb 2008 12:12

Hello Amish!
To solve the problem, try setting:
Code: Select all
[mysqld]
max_allowed_packet=167772160

in the MySQL server configuration. Please ensure that this property has changed indeed (you can use 'show variables' command).
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby Amish » Tue 12 Feb 2008 13:43

Its done....

But i was not able do it the way you suggested.

I changed the variable max_allowed_packet to the the value you described above in my.ini file in Program files of MYSQL 4.1.

I failed to do it in mysql command line.

Some syntax problem was there.

Anyways..

Thank you very much for your help.
Amish
 
Posts: 20
Joined: Thu 05 Apr 2007 12:04
Location: INDIA

Postby Alexey.mdr » Tue 12 Feb 2008 14:59

Welcome!
We are glad that the problem is solved.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24


Return to dotConnect for MySQL