View Single Post
  #2  
Old 10-03-2012, 11:17 AM
rlb rlb is offline
Junior Member
 
Join Date: Sep 2012
Posts: 2
Default

It was a silly error that caused the problem.

I created the thread with the following code:

//Start code snippet
with TSearchThread.Create(
FADOConnection.ConnectionString, FADOConnection.Provider, FADOConnection) do
OnTerminate := ThreadDone;
SearchBtn.Enabled := False;
try
SearchThread.Execute;
finally
SearchThread.Terminate;
end;
//End code snippet

The call to SearchThread.Execute and SearchThread.Terminate were unnecessary. Calling SearchThread.Execute started a second thread running giving the unusual debug results. Both lines have been removed and the thread now runs ok.
R.
Reply With Quote