I tried to stop very long time executing query, can someone help me ?
I execute "query->Open()" in a thread and "Query->Close()" in an other.
That causes an abnormal termination exception and clos the application.
Is ther a simple way with myDac components to do this ?
Stoping query while opening
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
I'm not sure there is a simple solution arround here.
It will be "safer" to kill your mySQL connection (check MySQL doc for SQL syntax). After killing your current connection you will get an exception (something like lost connection to mysql server). Try to Catch this exception and either hide it or display it (in a memo comp or something similar)
But this solution is somehow risky ! you can get the server crazy, specially if using transaction (after killing the connection, mysql will do some roolback job)
It will be "safer" to kill your mySQL connection (check MySQL doc for SQL syntax). After killing your current connection you will get an exception (something like lost connection to mysql server). Try to Catch this exception and either hide it or display it (in a memo comp or something similar)
But this solution is somehow risky ! you can get the server crazy, specially if using transaction (after killing the connection, mysql will do some roolback job)