Subject Localhost not recognized on XP but 127.0.0.1 works
Author genkibaasan
I apologize if this problem turns out to be off subject. In fact I don't know whether it is caused by IBObjects, Firebird, Windows or the combination. I feel sure someone here can help me, so I have joined the group. Hello, and thanks in advance.

I have a desktop main development machine with Windows 7, Firebird 2.1.3 Superserver, Delphi 2010 and IBOjects. I have databases defined in aliases.conf, which my applications access with cpTCP_IP using the IB_Connection parameter Server = localhost and path = aliasname. Everything works fine.

I also have a laptop under XP running Firebird 2.1.3 superserver, Delphi 2010 and IBObjects, which I use when away from home, as I am at present. After copying my project source code onto the laptop I tried to make some changes to one of the applications. Now on connecting to the database I get an ISC error 335544721 with the message
'Unable to complete network request to host "localhost".
Failed to locate host machine.
The specified file was not found in the hosts file or Domain Name Services.'

But localhost IS in hosts.
I can ping localhost successfully.
IBOjects connects to the databases in design mode without problems.
FlameRobin connects to the databases.
If I replace localhost with the loopback address 127.0.0.1 my applications CAN connect.

I have tried various remedies but nothing makes localhost work, viz.
- opening port 3050 in Windows firewall;
- disabling the firewall;
- adding the gds_db service to services (it was missing, but is it necessary for localhost? In any case I obviously don't get as far as looking for the service since I can't find the server);
- adding/removing Rootdirectory in firebird.conf;
- removing the FIREBIRD environment variable.

What have I overlooked?
The only difference between the two setups that I am aware of is the version of Windows. Unfortunately I am away from home and can't check the maain machine config.
Can anyone explain what is happenning here, please?