Page 1 of 1

Problem to access FireBird 2.5 embedded server

Posted: Wed 06 Apr 2011 12:09
by Nols Smit
Hi,

If I try to connect to an embedded FireBird 2.5 database with the source below, using UniDac, I get the error message: Unable to complete network request to host “LocalHost”


with UniConnection1 do
begin
Connected := false;
ProviderName := 'InterBase';
loginPrompt := false;
Username := 'SYSDBA';
Database := + DBName; {in IntraWeb it is gsAppPath}
Password := 'masterkey';

try
Open;
except
raise;
end;

end;


Using IBOjects in Delphi7 I am able to connect to the embedded FireBird 2.5 database using the following source:

with ThisConnection do
begin
loginPrompt := false;
Params.Clear;
ParameterOrder := poAuto;
Username := 'SYSDBA';
SQLDialect := 3;

Database := + DBName; {in IntraWeb it is gsAppPath}
Protocol := cpLocal;
Password := 'masterkey';

try
Open;
except
raise;
end;
end;

I use exactly the same client libraries and database in both cases.


Any idea why UniDac refuses connection?


Regards,

Nols Smit

Posted: Wed 06 Apr 2011 13:10
by AndreyZ
Hello,

Firebird embedded server supports access only via the local protocol. Please try using the following code:

Code: Select all

UniConnection.ProviderName := 'Interbase';
UniConnection.SpecificOptions.Values['ClientLibrary'] := 'fbembed.dll';
UniConnection.Server := ''; // using the local protocol
UniConnection.Database := 'your_database';
UniConnection.Username := 'sysdba';
UniConnection.Password := 'masterkey';
UniConnection.Connect;

Can now access Firebird embedded

Posted: Thu 07 Apr 2011 09:13
by Nols Smit
Hi,

Thanks, it's working.

Regards,

Nols Smit

Posted: Thu 07 Apr 2011 09:44
by AndreyZ
Feel free to contact us if you have any further questions about UniDAC.