Subject Re: [IBO] Firebird Server check
Author Helen Borrie
At 09:52 AM 2/03/2005 +0200, Vahan Yoghoudjian wrote:

> Hi Group
>
>My 2 questions are related to each other, the first one is about Firebird
>and the second one is about IBO tools that's why I'll post my message in
>both groups.
>
>1) Firebird: If I'm not mistaken, to check if Firebird is installed on my
>machine I have to check if the file fbclient.dll exists on my machine

No use, because 80% of Windows applications rename fbclient.dll as
gds32.dll and locate it in the system directory.

>... how
>can I check if this dll is registered or not, or if it is registered, it is
>in the location it should be?

"The location it should be" (and its name) depend entirely on the
application and how the developer chooses to set it up. It is not
uncommon, for example, to locate the client library in the application
directory...

Sometimes, developers want to deploy some of the command-line tools. In
that case, more client-side setup is needed.

A client application also can't (or should not be able to) read the
filesystem structure on the host machine.


>2) IBO: During the startup of my application I want to check if Firebird is
>installed on the machine the application is running, after making sure that
>it is installed, do I have a way using IBO tools to check if the server is
>running or not?

If an API application, e.g. an IBO one, can't connect to a running server,
the client returns an exception. The IBO connection object intercepts this
exception and interprets it for the client. You can intercept it yourself
and handle the situation in your own way.

IBO also checks to find out whether the running server is Firebird 1.5. It
needs to do this because IBO traditionally had a built-in workaround for a
persistent bug in the way InterBase manages the parameter structures. This
bug is fixed in Firebird but not in InterBase or Firebird 1.0, so IBO from
v.4.3-forward runs a special query that can tell it whether it is
connecting to Firebird 1.5.

>if it is not running, can I run the server within inside my
>application?

If you are talking about an application and a server running on a single
machine, you should look at Firebird 1.5 Embedded.


>I'm using IBO 4.5 and Firebird 1.5 with Delphi 6

So am I. :-))

Helen