Re: ADOQuery in thread hangs



Mikael Lenfors wrote:

Hello!

Having a real nightmare problem at the moment. In my main program I
have a ADOConnection and several associated ADOQuerys. They are all
connected to an Access file. Then I have a TThread containing it's
own ADOQuery, connecting to the same Access file doing some selects.
I can run the thread as many times as I want without any problem. If
I then do an Insert statement in the main program a strange thing
happenes. The next time I'm running the thread it DIES at the first
line where I do ADOQuery.SQL.Add...

ADOQuery.Close;
ADOQuery.SQL.Clear;
ADOQuery.SQL.Add('Select * From Units Where UnitID = ' +
IntToStr(UnitRecord.UnitID)); ADOQuery.Open;

The above is sample code from the thread, if I trace it and press F8
at the Add line it just dies there, no exceptions what so ever.


does it die or does it simply halt?

--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam

.



Relevant Pages

  • ADOQuery in thread hangs
    ... Having a real nightmare problem at the moment. ... ADOConnection and several associated ADOQuerys. ... Then I have a TThread containing it's own ADOQuery, connecting to the same ... Access file doing some selects. ...
    (borland.public.delphi.database.ado)
  • Re: ADOQuery in thread hangs
    ... Having a real nightmare problem at the moment. ... ADOConnection and several associated ADOQuerys. ... Then I have a TThread containing it's own ADOQuery, connecting to the same ... Access file doing some selects. ...
    (borland.public.delphi.database.ado)