James Fergus
James Fergus

Reputation: 21

Connecting Delphi 10.1 to Interbase XE7 Desktop in the Rad Studio Development Environment

I wanted to use the Desktop version of IB XE7 in my development environment but can't get the connection to work.

The original app had used a full server version of IB and I now wanted to run the app on a lower cost single PC type application and selected the IB Desktop version.

The Rad Studio 10.1 Berlin is running on a W7 64bit Virtual machine. FireDac is the database connection component. IB XE7 Desktop is the database server on the development PC.

Target for the application is a VM with W7 32bit, with another IB XE7 Desktop on that VM.

I can build the 32 bit app and it will connect to the IB XE7 Desktop on the target PC (running W7 32bit in a VM) after changing the FireDac connection component protocol field to 'local' instead of TCP/IP, something I read in Stack Overflow.

What I can't get to work is the database connection in the development environment.

I first installed the 64 bit version of IB, then removed it and tried the 32 bit version with the same result.

After reading up on some connection problems online, I tried putting 'gds_db' and 'localhost/gds_db' in the server name field, but it still didn't work, although it did change the error.


Error - with nothing in the server name


[FireDAC][Phys][IB]unavailable database.



Error after putting 'gds_db' in the server name


[FireDAC][Phys][IB]Unable to complete network request to host "gds_db".

Failed to locate host machine.

The specified name was not found in the hosts file or Domain Name Services..


First tried 64 bit IB installed, then removed all gsd files found and then the Registry entries, and installed the 32bit version. Problem still persisted.

Note: Database Workbench 5 connects OK to the database on the same VM.

Any ideas welcome.

Thanks.

James F.

Upvotes: 2

Views: 2457

Answers (1)

MartynA
MartynA

Reputation: 30715

I remember it being quite a performance to get Delphi XE8 + Seattle working with IB XE7, in particular I kept getting the "unavailable database" error when trying to connect from inside the IDE. Note: the following are things I found necessary to get Delphi working with a local instance of the full IB XE7 package. Requirements for the Developer and Desktop editions very probably differ, hopefully in ways explained in their documentation.

Some of the things to check are:

  1. Check in the Windows Services app that the server is running.

    My server shows up as

    Interbase XE7 Server gds_db

As you can see, the Services app should tell you the name of the server.

  1. If you want to connect to it via TPC/IP check that you have an entry in your \windows\system32\drivers\etc\service file like this

    gds_db 3050/tcp # InterBase Server

    Hash-sign developer_ibxe7 3054/tcp # InterBase Server

The line containing developer_ibxe7 should start with a #, but SO won't display that for some reason. Anyway, that line is commented out because it refers to a developer edition I installed at some point.

  1. Check that your OS environment contains an entry like this one

    INTERBASE=d:\ibxe7

If it isn't, add it and reboot the machine.

In my case, d:\ibxe7 is the top-level folder in which I have IB XE7 installed.

With those things set up/checked start a new Delphi project in the IDE, add an IBConnection to it, and set its DatabaseName to a local IB database. For me, specifying

LocalHost:D:\Delphi\Interbase\Databases\MA.GDB

works fine. Then, see if you can set the Connected property to True. If you can't, leave a comment and I'll see what else I can remember.

Upvotes: 2

Related Questions