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
Connection loss when FetchAll = False
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.
-
GuzunNicolae
- Posts: 78
- Joined: Wed 17 Jan 2007 14:16
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.
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.