Page 1 of 1

Connection loss when FetchAll = False

Posted: Mon 22 Jan 2007 17:01
by GuzunNicolae
Hello, everybody

Thanks for previous help, but I have one more problem working with MySQL when I set FetchAll=False. I need FetchAll=False cause I have a lot of records.

Now when I want to make a new search with a Query I get 'Connection lost during query' at Query.Close statement. The query is even not executed.

I read about this error on this forum and I can say the following:
- the CommandTimeOut is set to 0 (infinite)
- wait_timeout on the server is 28800
- I use it in LAN, the server is in the same room as my PC. The connection is stable and fast.
- the search is very fast, so it cannot be timeout problem.
- database type is InnoDB, but I don't know for sure. Tell me how to find out this to be sure.

After I get this error and I press F9 the program runs as it should.

This happens only with FetchAll=False

Thanks

Posted: Tue 23 Jan 2007 12:13
by Antaeus
If you close a DataSet (TMyQuery, TMyTable) in FetchAll=False mode, the additional connection used to fetch data is killed by the KILL command. This is the reason of the error you are seeing. This is the way to sharply stop data fetch and close this connection. This error message may appear under the debugger, but must not appear without it.

Posted: Tue 23 Jan 2007 14:21
by GuzunNicolae
This means there is no problem!!! :D

Thanks a lot!

Posted: Tue 05 Jun 2007 12:26
by deca
Hi,

i have the same "problem" and already know that is only in debugmode, but also there it is very stressful when debug a long time and get permantly the error dialog.

So maybe you can fix this? or is there a workaround without setting fetchall=true

Posted: Tue 05 Jun 2007 12:41
by Antaeus
This is a peculiarity of the MyDAC architecture. We will consider possibility to change this in the future.

You can suppress this exception using Debugger Options of your IDE. Just call the corresponding dialog from the Tools IDE menu, and add EMySQLException to the Exception Types to Ignore on the Language Exception tab.

Posted: Tue 05 Jun 2007 12:59
by deca
Thank you for the quick reply,

it works fine.

But now i would get none mysqlerrors, even when it's important, so hoping the future is not as far away :)