Lost Connection and Timeout setting...

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
renato

Lost Connection and Timeout setting...

Post by renato » Wed 15 Jun 2005 13:47

Hi,

Im using MyDac v:3.10.1.7 and Delphi 7...

I builded an aplication that is connected into an internet database.

My internet server set the (mysql database server) timeout for 40 (sec), so... Im getting this god damn "Lost Connection bla bla" error message all the time...

I noticed, that if click ok on the error message and I try to execute the same process right way, it works just fine...

So... my question is:
could anyone help me to sort this problem out without changing the server's timeout?

(My internet provider has already told me that they cannot change it in anyway... at all... and I don't have the autonomy to move to another provider!!)

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 15 Jun 2005 14:41

At first, read chapter A.2.8 MySQL server has gone away from MySQL Reference Manual.

What value of wait_timeout do you set at the server?

Renato

Post by Renato » Wed 15 Jun 2005 15:11

Hi Ikar,

At the server, the wait_timeout is 40... but it is an internet server!
I dont have access to change this value...

I just would like to know, if there is a way to work this problem out...

Because, everytime that I got this error message, if I repeat the process straight away, it works fine.

So...

Im not sure, but I think that a kind of refresh or retry process happen after I click [OK]...




PS: Sorry about my english, Im in Brazil, and Im trying hard to make myself understandable... :(

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 16 Jun 2005 10:45

Try to call each, for example 10 seconds MyConnection.Ping. Also don't use
FetchAll = False.

Renato

You are the guy!

Post by Renato » Thu 16 Jun 2005 12:03

My Brother in Arm!

Thank you soooooooooo much !
You just saved my job!

:D

I really appreciated your help!
Long life for Ikar !

8)

R.


"some people say a man's made out of mud,
But a poor man's made out of muscle and blood,
Muscle and blood, skin and bones,
A mind that's weak and a back that's strong.

You load sixteen tons and what do you get?
Another day older and deeper in debt.
Saint Peter, don't you call me 'cause I can't go,
l owe my soul to the company store"

:wink:

Post Reply