LibMySQL.dll and Lost connections during Query
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
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
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
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
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?
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?
Please specify when this exception raises: when you execute your command or when you connect to the database?
If you write the next code:will this code work at you always or will an exception be generated, and at that moment.
If you write the next code:
Code: Select all
connection.Open();
connection.ExecSQL('...');
connection.Close();