Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: ADQuery.OnError + Close; = The program hangs tight
ADQuery.OnError + Close; = The program hangs tight
Posted: 2007/10/23 09:05
 
Use this event:


 procedure TTreeEditorForm.ADQuery1Error(ASenderTObject;   const AInitiatorIADStanObject; var AExceptionException); begin MessageDlg('Action error:'+#13+AException.Message+#13+'Current windows will be close!',mtError, [mbOk],0); TreeEditorForm.Close; end;



I want close window if was any DB errors, close work, BUT, The program hangs tight

AnyDac 2.0.5 + Delphi 2007 SP1 + MySQL 5.0.41

Post edited by: MMM_Corp, at: 2007/10/23 09:06
Re:ADQuery.OnError + Close; = The program hangs tight
Posted: 2007/10/23 09:42
 
Hello

I dont think I can fix that. I will suggest to call

 PostMessage(HandleWM_CLOSE00)


instead of

 TreeEditorForm.Close;



Regards,
Dmitry