Subject Re: [firebird-support] Re: Cannot connect to a local database
Author Helen Borrie
At 11:49 PM 11/08/2004 +0000, you wrote:
>--- In firebird-support@yahoogroups.com, Lester Caine <lester@l...> wrote:
> > phil_hhn wrote:
> >
> > > Anyone out there have any ideas? This is quite a problem having a
> > > developer who is unable to browse the datanase (with IBExpert)....
> >
> > Which versions of things? OS, Firebird
> > Can you connect to his from your machine?
> > What happens if you try and create a new database in IBExpert?
> > Can you drop on a copy of IB_SQL and see what that does when trying to
> > connect.
>
>WinXP SP1,
>Firebird 1.5:
>fbserver.exe (WI-V1.5.0.4306)
>fbguard.exe (WI-V1.5.0.4306)
>IBExpert 2004 (2004.4.1.1)

It's also important to find out whether you have the correct client
library. For most Delphi-built tools (like IBExpert and IB_SQL) it needs
to be gds32.dll, located in the system directory and having the same build
number as the server.

For Fb 1.5 you'll need to read the docs about how to convert fbclient.dll
into a compatible gds32.dll for IBExpert. For IB_SQL you only need to copy
and rename fbclient.dll.


>I cannot create a new database on their PC using IBExpert (I get the
>same error).
>I've tried connecting to their database from my IBExpert (register new
>database) but again get the same error.

Sounds like a bad or missing client.

>BTW, how can I connect to their server without specifying the database
>file? I.e as a client I expect to be able to just specify an IP and
>port (defaults to 3050, right? but where can I change it...)

Don't change it unless you have a reason to, e.g. a conflicting ibserver
running on the same host. In that case, hold your mouth right and read the
detailed doc in the 1.5 release notes about configuring the service port.

>, but seems I have to specify the database file also

Client applications connect to databases. They do this via the server. If
you were able to just "connect to the server", what would you expect to see/do?

>(is this going to work when it's on their machine?).

Provided you have configured you app to connect to the correct filesystem
path for the database file, yes. Aliasing helps a lot here. Have the app
connect to an alias and configure the path in aliases.conf. When deploying
then all you need to do is edit aliases.conf on the deployed server.

Other strategies are to use ini files or (as IBExpert and IB_SQL do) use
the Registry.

>I can understand this may be necessary to specify on the server end, but
>the client should just be able to connect to the database on a particular
>IP & port, without specifying the underlying database file, right?

Wrong. The *server* is listening on the IP and port combination. The IP
is the network address of the server hardware. The port is the socket that
is listening for a connection request. Both are server-level. The path in
the connection string directs the server to the location of the database
file. The !!! correct !!! client library connects the client app to the
appropriate database. (There may be many databases on a single server).

For a local connection you need to use the localhost IP address. Check
that the %system%\drivers\etc\hosts file has the entry

127.0.0.1 localhost

Connection path is localhost:DRIVE:\data\mydatabase.fdb, e.g. for the
employee database,
localhost:c:\Program Files\Firebird\Firebird_1_5\examples\employee.fdb


>Where can I find IB_SQL?

Download at http://www.ibobjects.com (button top RH side of main page).

/heLen