Subject RE: [IBO] TIB_Connection: error msg displayed upon cancel
Author Helen Borrie (TeamIBO)
At 08:42 AM 13-08-02 +0100, you wrote:
>Morning Raymond,
>OK, I had a look in the source code for a login and found a quick change
>that can be made. I don't know if you have access to the source code but
>maybe you have enough to try the following :
>in the file IBA_Connection.imp find the procedute TIB_Connection.SysLogin
>and just before the final 'end' you will find these lines :
> if not Connected then
> DoLoginFailure;
>Change them to read as follows :
> if not Connected then
> if LoginAborted then
> Abort
> else
> DoLoginFailure;
>Now if the user click Cancel, LoginAborted is set true and the procedure
>Aborts (which doesn't raise an exception) but if it is any other failure,
>the current processing is carried out - an exception is raised (Login

Modifying the source code of the component is a rather **extreme** way to
avoid writing an event handler! <g> This is **Delphi**, guys!!

Without modifying the source code, you can achieve the same as this (or any
other thing you want) by writing a handler for the OnLoginFailure event.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at