Page 1 of 1

MyCommand lost connection problem

Posted: Fri 28 Jan 2005 06:52
by Jonathan Liaw
Hi,

In version 3.30.2.15, I use a multi SQL statement as follow:

DROP TEMPORARY TABLE IF EXISTS TempItem;

CREATE TEMPORARY TABLE IF NOT EXISTS TempItem;

SELECT ItemLinkID FROM Item
WHERE
(ItemLinkID NOT IN (SELECT ItemLinkID FROM Item INNER JOIN GroupID ON (Item.GroupID = GroupID.GroupID)))
AND (GroupID '');
UPDATE Item SET Item.GroupID = '' WHERE Item.ItemLinkID IN (SELECT * FROM TempItem);


If I execute the MyCommand more than 2 times, I get the following error message:

Lost connection to MySQL server during query


The compoent setting has the following values:

MyConnection Setting:
object cntMySQL: TMyConnection
Database = 'TobTyre'
Options.Compress = True
Options.Direct = False
Pooling = True
Username = 'root'
Password = 'password'
Server = 'localhost'
LoginPrompt = False
Left = 248
Top = 20
end

I have tried myConnection's Options.Direct = True and the problem still persists.

Please help

Jonathan Liaw

Re: MyCommand lost connection problem

Posted: Fri 28 Jan 2005 13:21
by Ikar
Try to increase a value of CommandTimeout.
What server version do you use?

MyCommand lost connection problem

Posted: Sat 29 Jan 2005 02:31
by Jonathan Liaw
MyDAC version 3.3 does not have the property for CoomandTimeOut. and the MySQL server we use is version 4.1.6

Re: MyCommand lost connection problem

Posted: Mon 31 Jan 2005 10:29
by Ikar
You should upgrade MyDAC to the last version or get to know about possible reasons of this error occurrence in MySQL Reference Manual A.2.8 MySQL server has gone away