Have you initialised COM for the thread?? -----Original Message----- From: Edward Huang [mailto:[EMAIL PROTECTED]] Sent: Friday, 2 August 2002 5:25 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: Asynchronous ADO Query
Thanks for your reply. But, I have change Sleep to SleepEx, put on active message loop, created an extra window in the thread in case it needs one, but still no luck. Any more suggestion? Is any thing related OLE needs to be done? -----Original Message----- From: Myles Penlington [mailto:[EMAIL PROTECTED]] Sent: Friday, 2 August 2002 4:22 To: Multiple recipients of list delphi Subject: RE: [DUG]: Asynchronous ADO Query You have to have an active message loop within the thread. Or use SleepEx() - Sleep is no good or use (MsgWaitForMultipleObjects( 1, WaitHandle, False, InactiveTime, QS_ALLINPUT) = WAIT_TIMEOUT) while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin if (Msg.Message = WM_QUIT) then Terminate else DispatchMessage(Msg); end; Can't remember which one to use or if the message loop has to be active as well. Myles. -----Original Message----- From: Edward Huang [mailto:[EMAIL PROTECTED]] Sent: Friday, 2 August 2002 4:18 p.m. To: Multiple recipients of list delphi Subject: [DUG]: Asynchronous ADO Query Hi, Has anyone used Asynchronous ADO Query? I need some help here. I have created an asynchronous ADO Query (with ExecuteOptions =[eoAsyncExecute,eoAsyncFetch]) within a thread. I called Query.Open and it set Query.State=dsOpening. I then start a while-loop to wait query.state changes, and at the same time checking for some of other flags. The problem I have is that Query.State stays as dsOpening, i.e. query never actually opens. Help please. Edward Huang --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/