Re: ADOQuery in thread hangs
- From: "Mikael Lenfors" <mikael@xxxxxxxxxx>
- Date: Wed, 22 Nov 2006 07:21:52 +0100
Yes I create a TADOQuery local to the thread. In the thread I don't have any
ADOConnection, I just use a connectionstring directly in the ADOQuery.
Mikael
"Brian Bushay TeamB" <BBushay@xxxxxxxxx> skrev i meddelandet
news:n897m2hao5o1ff76lq199v79aav5oqtvtu@xxxxxxxxxx
Hello!When you use a thread you need to create the TadoQuery as well as its
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.
Running Win XP Pro and Delphi Studio 2006
Please any ideas?
connection
in the thread. You didn't indicate if that is what you are doing.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: ADOQuery in thread hangs
- From: Guillem
- Re: ADOQuery in thread hangs
- From: Mikael Lenfors
- Re: ADOQuery in thread hangs
- References:
- ADOQuery in thread hangs
- From: Mikael Lenfors
- Re: ADOQuery in thread hangs
- From: Brian Bushay TeamB
- ADOQuery in thread hangs
- Prev by Date: Re: ADOQuery in thread hangs
- Next by Date: Re: ADOQuery in thread hangs
- Previous by thread: Re: ADOQuery in thread hangs
- Next by thread: Re: ADOQuery in thread hangs
- Index(es):
Relevant Pages
|