Subject Re: [IBO] IB Connection
Author Geoff Worboys
> I am new to Delphi, Interbase and IBObjects though I am not
> new to programming or dbs.

Wow, you are in for an interesting time! :-)

Simple bits first...

> if IB_Connection1.Connected

"Connected" is a property not a function. Delphi properties can be
readonly, writeonly or read and write.

A := IB_Connection.Connected;
If IB_Connection.Connected then

IB_Connection.Connected := A;

So to connect in this example you must set the property value. For

// Try and set connected to true
IB_Connection.Connected := true;
// now test if actually connected
if IB_Connection1.Connected
label2.Caption := 'Connected'
label2.Caption := 'Not Connected';

Now the more complicated aspect, which may be redundant...

> if FileExists(IB_Connection1.Path)

You may or may not know that this will ONLY work for a local
installation. The Path information is always the full, real path of
the database file ON THE SERVER. With a local installation the server
is where you are, so the code works. With a remote installation this
is not possible. All you can do is try to connect and respond to any
exceptions that may occur.


Geoff Worboys
Telesis Computing