Opening Delphi data module with TZConnection: very slow

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
kvanderhoek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 26.10.2007, 11:39

Opening Delphi data module with TZConnection: very slow

Post 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!
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
jozagulikoza
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.08.2007, 12:26

Post by jozagulikoza »

If you have Zqueries in data module they must be closed and open then when you need them
kvanderhoek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 26.10.2007, 11:39

Post 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?
jozagulikoza
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.08.2007, 12:26

Post 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?
kvanderhoek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 26.10.2007, 11:39

Post 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).
jozagulikoza
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.08.2007, 12:26

Post by jozagulikoza »

Monitor establishing of connectin on server side (when you open connecton during design time).
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
kvanderhoek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 26.10.2007, 11:39

Post 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!
Post Reply