Subject RE: [IBO] TIB_Connection: error msg displayed upon cancel
Author Norman Dunbar
Hi Raymond,

I have exactly the same 'problem' as this with some Oracle access components
I use in my real job. If the user decides to cancel a login then they get a
'User aborted' message.

I also consider it to be normal behaiviour and quite acceptable. However, I
can, if I wish, code an exception handler and filter it out if I choose to
do so.

As Nando mentioned, the action being attempted is setting connected to true.
This has not happened - because of the user's actions - and so it has
failed. The failure has raised an exception, but withing the context of the
component not in the context of your application. This is then passed back
to your app to handle or ignore accordingly. As with all exceptions the
developer chooses how to handle it - s/he can ignore it or display a
message. In this case, the default action is to display it.

Try catching it and simply ignoring it. I'd advise you to filter out the
cancelled login exception and still display any others just in case you hit
something a bit different like "Oops, the user forgot to start his
Firebird/Interbase server" - I've done that myself too many times!


Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
Tel: 0113 289 6265
Fax: 0113 289 3146

-----Original Message-----
From: Raymond Kennington [mailto:raymondk@...]
Sent: Monday, August 12, 2002 4:34 PM
Subject: Re: [IBO] TIB_Connection: error msg displayed upon cancel

Why have a message box with Ok/Cancel if cancelling the logon is going to
bring up an
Error message?

I was so surprised that I actually was startled by the white cross on a red
What could be wrong?

Connected would only be attempted if I choose Ok, for then a username and a
password would
have been entered and the user (the developer in the IDE in this case) would
want to
attempt to set it to true.

An attempt to set Connected to True should only occur if I press Ok and no
attempt should
be made to Connect if I choose to cancel the option.

Raymond Kennington

This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.