Hello, Tony,
I think that IBX's strategy of finding the client library path should be changed.
Please allow me to explain my today's experience:
On my Windows 7 computer, I just couldn't make IBDatabase connect.
I tried on Linux and had no problems. I tried on another computer with Windows, and it also just worked without problems.
Both these Windows machines have the same FB version installed, both have fbclient.dll of the same version (3.0.4) in System32 directory.
On both machines, FlameRobin connects without problems.
On both machines other libraries in Lazarus (I tried SQLdb and Zeos) connect without problems.
I had no idea what it could be, then, I tried to give client dll path expicitely, and I was surprised that it worked:
procedure TForm1.Button1Click(Sender: TObject);
begin
// Only with this line, the connection was succesfull:
IBDatabase1.FirebirdLibraryPathName := 'C:\Windows\System32\FBCLIENT.DLL';
IBDatabase1.DatabaseName := 'localhost/3053:employee';
IBDatabase1.Params.Values['lc_ctype'] := 'UTF8';
IBDatabase1.Params.Values['user_name'] := 'sysdba';
IBDatabase1.Params.Values['password'] := 'masterkey';
IBDatabase1.Connected := True;
end;
However, I know that, if IBX didn't see any client library, the components would not appear in component palette at all. Hence, it does see it.
Then I found it -- apart from FB 3.0.4, I have FB 2.5 engine installed on same machine. They use different ports.
What should matter is that the client library installed in system directory is fbclient 3.0.4.
However, there was still fbclient.dll 2.5 inside folder where FB 2.5 engine is installed. When I removed it, everything started to work, without setting the client path explicitely.
Yes, the old FB 2.5 engine is installed in default location (C:\Program files\Firebird\... etc.), and FB 3.0 is not, but that should not matter. The two services listen to different ports, and again, only newer client is installed in system folder, which is why other client utilities make their connections through it.
I could accept that the application's folder might have priority over system folder (and that is still questionable, if a programmer wants to distribute client library in application folder, he knows what he is doing and he can set FirebirdLibraryName to current directory in code).
Anyway, I strongly believe that client library which is installed in system folder must have priority over default installation folder of FB engine.
My customer could even have older Firebird server installed on current machine, but want to connect to different server which has newer FB engine. He should just install newer client, no need to touch his old server installation -- newer client library connects to older server, but the older cannot connect to new FB engine.
Don't you agree?