Re: ADOQuery in thread hangs, Solved !!!!!!!!!
- From: "Mikael Lenfors" <mikael@xxxxxxxxxx>
- Date: Wed, 22 Nov 2006 20:04:07 +0100
Hello!
I finally solved the problem (I hope) after 10 hours of work.
For those not interested in reading the hole story the problem was that ADO
queries stopped working in my TThread.
It seems like the problem is the Max() function in SQL!
If I run the query "Select Max(MyID) From MyTable" from my main program,
efter this ADOqueries didn't work any more in my thread. The thread just
hung when trying to do a ADOQuery.SQL.Add(...)
After rewriting the select To "Select MyID From Mytable Order By MyID Desc"
in the main program and picking the first returned record (giving the same
result as above) everyting works!
Can anyone explain this strange error? Of course my workaround is not wery
good for large tables....
Regards, Mikael
.
- Follow-Ups:
- Re: ADOQuery in thread hangs, Solved !!!!!!!!!
- From: Guillem
- Re: ADOQuery in thread hangs, Solved !!!!!!!!!
- From: Vitali Kalinin
- Re: ADOQuery in thread hangs, Solved !!!!!!!!!
- References:
- ADOQuery in thread hangs
- From: Mikael Lenfors
- ADOQuery in thread hangs
- Prev by Date: Cancelling an ADO Command takes too long
- Next by Date: No update of DBGrid based on TADOQuery?
- Previous by thread: Re: ADOQuery in thread hangs
- Next by thread: Re: ADOQuery in thread hangs, Solved !!!!!!!!!
- Index(es):