Page 1 of 1
Dont freeze app while connecting
Posted: Wed 01 Jun 2005 20:40
by ben
Hello,
when I call Connect() the application freezes until it returns an error msg. How can I have a working application without freezing the app?
Any redirection?
Posted: Thu 02 Jun 2005 07:31
by Ikar
Use TThread descendant. Refer to Delphi help for details
Posted: Fri 03 Jun 2005 19:54
by ben
everything looks ok with TThread but there is a small problem.
If I call Connect() inside a thread and then I dont wait to connect and I close the form, the application is still in memory.
Although I have managed to stop the thread OnClose (or OnCloseQuery) it doesnt work. Maybe I need to cancel the connection attempt also, something like MyConnection.Abort() but... there is no Abort or a related function to stop the component from trying to connect.
Posted: Mon 06 Jun 2005 14:05
by Ikar
MySQL doesn't give a possibility to break a connection at the time of its establishing. Probably, if you decrease a value of ConnectionTimeout it will help you.