Page 1 of 1

Opening Delphi data module with TZConnection: very slow

Posted: 26.10.2007, 11:43
by kvanderhoek
I have a Delphi project with a data module that contains a TZConnection component to connect to a MySQL database. When I start working on the project and open the project in Delphi, it takes for about 15 minutes (and this time increases over time) to open the data module file...

During runtime of my project all is fine: the connection is established fast and query performance is also just fine.

Does anybody have any clue what the problem could be? I was thinking of a log file or something getting too large, but that doesn't seem to be the problem. Any help or hint is welcome!

I'm using: Delphi 2005, MySQL 4.1.22 and ZeosLib 6.6.0 beta.

Thnx!

Posted: 26.10.2007, 12:09
by mdaems
Is it just one TZConnection object or are there more objects?
Do you have an open connection at design time? Are the queries in your project all loading at design time?

Mark

Posted: 26.10.2007, 12:10
by jozagulikoza
If you have Zqueries in data module they must be closed and open then when you need them

Posted: 26.10.2007, 12:26
by kvanderhoek
I have done some testing: the problem also occurs when I add a TZConnection to a form in a clean project. So, no TZQueries or any related components, just the TZConnection. It now takes up to almost 25 minutes... Very frustrating when you want to start working on a project immediately ;)

Any ideas?

Posted: 26.10.2007, 12:54
by jozagulikoza
Tel us a version of DB server. Where is server? On your computer or in the net?
Probably this is not delphi or zconnect problem.
Can you normaly connect to server with some other program from yor computer?

Posted: 26.10.2007, 13:01
by kvanderhoek
Database server is MySQL 4.1.22. It runs on localhost. Connecting to the database directly using MySQL Administrator or phpmyadmin is fast. Creating the TZConnection is slow. TZConnection is disconnected by default, so I think this problem is not related to the DB (server).

Posted: 26.10.2007, 14:15
by jozagulikoza
Monitor establishing of connectin on server side (when you open connecton during design time).

Posted: 26.10.2007, 15:05
by mdaems
Maybe a problem when Delphi is looking for the bpl/libmysql.dll files?
Sounds very unlikely, but one never knows. I'm not using D2005, so it could be Delphi version dependent.
Did you try a fresh Delphi install? (bad option, I know, but when software goes mad it may be the easiest solution)

Mark

Posted: 26.10.2007, 17:47
by kvanderhoek
I have removed and reinstalled all packages, including Zeos lib package. Now everything is working fine again! Thanks for your thinking and help!