Subject | Re: [IBO] IBD_Login question |
---|---|
Author | roberto_nahum |
Post date | 2003-05-14T10:43:41Z |
--- In IBObjects@yahoogroups.com, "Alan McDonald" <alan@m...> wrote:
investigations.
I found that changing the call to Abort with Exit on line 1192 of
IBA_Connection.IMP allows me to check the value of LoginAborted after
calling IB_Connection.Connect
So to close the application now I can, in the main form, use:
IB_Connection1.Connect;
if IB_Connection1.LoginAborted then
Close;
I don't see any side effect by now. Maybe the modification can be
included in the official IBA_Connection.IMP?
Roberto
> > >procedure TdmMyDm.cn1BeforeConnect(Sender: TIB_Connection);comes up, so
> > >begin
> > > // if LoginAborted then
> >
> > if Sender.LoginAborted then
> >
> > > begin
> > > ShowMessage('Login cancelled'); // only if you want to
> > give feedback
> > > Sysutils.Abort;
> > > end
> > > else
> > > inherited;
> > >end;
>
> Funny, but before connected gets called before the login dialog
> cacellation does occur hereI had the same problem and following your message I did some
> Alan
investigations.
I found that changing the call to Abort with Exit on line 1192 of
IBA_Connection.IMP allows me to check the value of LoginAborted after
calling IB_Connection.Connect
So to close the application now I can, in the main form, use:
IB_Connection1.Connect;
if IB_Connection1.LoginAborted then
Close;
I don't see any side effect by now. Maybe the modification can be
included in the official IBA_Connection.IMP?
Roberto