Subject Re: [IBO] Re: Preventing Auto login
Author Woody
----- Original Message -----
From: "clivewalden" <clivew@...>
> What I was actually trying to address is getting this message after a
> call to IBOQuery.Open when the user is not logged in. Rather than
> automatically trying to connect and getting the (reasonable) reply
> from the server, I would like like IBObjects to return a "Not logged
> in" message.
> Is there a setting for that or do I have to check myself in every
> situation?

I solve this by adding a function to the main datamodule called
IsDatabaseConnected. It returns true or false based on whether the database
is any time. I use the BeforeOpen method of any data components
to test this condition. I can also use it disable any buttons, forms, etc.
that require the database to be connected. In some situations, I can then
prompt the user to log in, if need be.


Woody (TMW)