MyCommand lost connection problem

MyCommand lost connection problem

Postby Jonathan Liaw » Fri 28 Jan 2005 06:52

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
Jonathan Liaw
 

Re: MyCommand lost connection problem

Postby Ikar » Fri 28 Jan 2005 13:21

Try to increase a value of CommandTimeout.
What server version do you use?
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

MyCommand lost connection problem

Postby Jonathan Liaw » Sat 29 Jan 2005 02:31

MyDAC version 3.3 does not have the property for CoomandTimeOut. and the MySQL server we use is version 4.1.6
Jonathan Liaw
 

Re: MyCommand lost connection problem

Postby Ikar » Mon 31 Jan 2005 10:29

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
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components