MyDAC disconnects after running a number of sequential SELECT queries
Posted: Fri 15 Feb 2008 10:53
Hello,
I want to read a number of values from MySql database. I define a tree structure in memory and then I fetch all the wanted values from the database using MyDAC. After running a number of loops (as low as 800!), MyDAC disconnects from the MySQL server and the connexion cannot be restablished. I have to wait before rerunning the app because sometimes, even rerunning it quickly gives a ‘desconnected’ error.
I am using:
- Windows XP Professional Version 2002 Service Pack 2
- C++ Builder 2007 CodeGear RAD Studio 2007 version 11.0.2902.10471
- MySQL 4.0.24-nt
- MyDAC version 5.20.0.11 for Delphi 2007
Running this example using the native MySQL API functions it works smoothly, without any disconnection. If I set the MyDAC ‘OnDisconnect’ event, it shoots, so MyDAC detects the disconnection. The problem is that it should not disconnect.
I don’t know if its a problem of MyDAC configuration or it is a basic limitation of the library.
I want to read a number of values from MySql database. I define a tree structure in memory and then I fetch all the wanted values from the database using MyDAC. After running a number of loops (as low as 800!), MyDAC disconnects from the MySQL server and the connexion cannot be restablished. I have to wait before rerunning the app because sometimes, even rerunning it quickly gives a ‘desconnected’ error.
I am using:
- Windows XP Professional Version 2002 Service Pack 2
- C++ Builder 2007 CodeGear RAD Studio 2007 version 11.0.2902.10471
- MySQL 4.0.24-nt
- MyDAC version 5.20.0.11 for Delphi 2007
Running this example using the native MySQL API functions it works smoothly, without any disconnection. If I set the MyDAC ‘OnDisconnect’ event, it shoots, so MyDAC detects the disconnection. The problem is that it should not disconnect.
I don’t know if its a problem of MyDAC configuration or it is a basic limitation of the library.