LibMySQL.dll and Lost connections during Query

Postby EPMS » Tue 21 Dec 2004 10:19

Hello,
sorry, my English is not very well.
I have the same Problem like TheLion. I have a Program data acquisition. When i start the Program and save the formular very fast without data then the save in the database is ok. but i have no data. when i fill out the edit fields and save then i get the error "Lost connections during Query".

I used TMyConnection.Options.Direct := False and i used TMyConnection.Options.Direct := True. But the i get the error both time.

What can i do?? Can i say in MyDAC that the connect doesn't end after a little time??

Thanks for answer
EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby Ikar » Wed 22 Dec 2004 09:44

Within the next few days MyDAC version with fixes will be available for download. But, possible, causes of your problem can differ from TheLion's. Possible reasons can be described in MySQL Reference Manual chapter A.2 Some Common Errors When Using MySQL (CR_SERVER_LOST)
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby EPMS » Sun 02 Jan 2005 14:06

Hello Ikar,
i think my problem is the Timeout in MySQL.
When I use TMyConnection with Double Click and go to Info i see Information about my MySQL Server. Their is "connection_timeout = 5". I think this means 5 seconds and than the connection end.

Is there a possibility in MyDAC to keep the Connection??? That were great or is something like that planed??

Greats
EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby TheLion » Sun 02 Jan 2005 20:24

HI :-)

Have you tried to make a simplified test? Use a MySQL table with one Key and one datafield?

If you Install the MySQL Admininistration program, you can see that as long as you havn't disconnected the connection, the connection is "Sleeping". A standard MySQL installation sets the connection timeout as 28800 seconds (8 hours). So I don't think that it is a timeout problem, but what do I know ;-)

Btw. are you up to date with the latest MySQL version? Are you using the latest MyDAC version?
TheLion
 
Posts: 39
Joined: Thu 25 Nov 2004 11:28
Location: Copenhagen/Denmark

Postby Ikar » Wed 05 Jan 2005 09:59

> "connection_timeout = 5".

Try to increase this value.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby EPMS » Fri 07 Jan 2005 21:21

Hi Ikar,

do you know where i can increase this value??

EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby EPMS » Sun 09 Jan 2005 19:41

Hi Ikar,

i increase the value. but nothing happend. what can i do??

EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby Oleg » Thu 13 Jan 2005 09:58

Please specify when this exception raises: when you execute your command or when you connect to the database?
If you write the next code:
Code: Select all
connection.Open();
connection.ExecSQL('...');
connection.Close();
will this code work at you always or will an exception be generated, and at that moment.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby EPMS » Fri 14 Jan 2005 20:35

Hello Oleg,
i have a DataModule with a database and a query. When i their connect to database and make after 8 secondy the query to active than comes the message.

Do you know what their a the mistake??

Thanks
EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby Ikar » Mon 17 Jan 2005 09:53

Please check that you use MyDAC 3.30.2.15

Please read attentively in MySQL Reference Manual a description of CR_SERVER_LOST. Most probably the problem is in incorrect settings of MySQL Server.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby EPMS » Mon 14 Feb 2005 08:14

Hello Ikar,

i use now Version 3.50.0.16. But I have the same Problems. I get the same Error Message.

Do you know what i can do??

Thanks
EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby Ikar » Mon 14 Feb 2005 14:03

Try to increase CommandTimeout
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby EPMS » Tue 15 Feb 2005 09:59

Hello Ikar,

can you say me which Setting is "CommandTimeout"?? In my MySQL i dont have this setting.

Thanks
EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Postby Ikar » Tue 15 Feb 2005 10:07

TMyCommand.CommandTimeout
TMyQuery.CommandTimeout
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby EPMS » Tue 15 Feb 2005 10:21

Hello Ikar,

give it a similar setting for "MyConnection"???
My Problem is that i connect to the MySQL Server and for example i write in a Database after 2 minutes. But then the connection is closed. I want that my connection is hold for a several minutes.

Is there any possibility??

Thanks
EPMS
EPMS
 
Posts: 15
Joined: Fri 10 Dec 2004 07:05

PreviousNext

Return to MySQL Data Access Components