Page 2 of 3

Posted: Tue 21 Dec 2004 10:19
by EPMS
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

Posted: Wed 22 Dec 2004 09:44
by Ikar
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)

Posted: Sun 02 Jan 2005 14:06
by EPMS
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

Posted: Sun 02 Jan 2005 20:24
by TheLion
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?

Posted: Wed 05 Jan 2005 09:59
by Ikar
> "connection_timeout = 5".

Try to increase this value.

Posted: Fri 07 Jan 2005 21:21
by EPMS
Hi Ikar,

do you know where i can increase this value??

EPMS

Posted: Sun 09 Jan 2005 19:41
by EPMS
Hi Ikar,

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

EPMS

Posted: Thu 13 Jan 2005 09:58
by Oleg
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.

Posted: Fri 14 Jan 2005 20:35
by EPMS
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

Posted: Mon 17 Jan 2005 09:53
by Ikar
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.

Posted: Mon 14 Feb 2005 08:14
by EPMS
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

Posted: Mon 14 Feb 2005 14:03
by Ikar
Try to increase CommandTimeout

Posted: Tue 15 Feb 2005 09:59
by EPMS
Hello Ikar,

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

Thanks
EPMS

Posted: Tue 15 Feb 2005 10:07
by Ikar
TMyCommand.CommandTimeout
TMyQuery.CommandTimeout

Posted: Tue 15 Feb 2005 10:21
by EPMS
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