Problem to access FireBird 2.5 embedded server

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Nols Smit
Posts: 15
Joined: Tue 11 Aug 2009 06:04

Problem to access FireBird 2.5 embedded server

Post by Nols Smit » Wed 06 Apr 2011 12:09

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

AndreyZ

Post by AndreyZ » Wed 06 Apr 2011 13:10

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;

Nols Smit
Posts: 15
Joined: Tue 11 Aug 2009 06:04

Can now access Firebird embedded

Post by Nols Smit » Thu 07 Apr 2011 09:13

Hi,

Thanks, it's working.

Regards,

Nols Smit

AndreyZ

Post by AndreyZ » Thu 07 Apr 2011 09:44

Feel free to contact us if you have any further questions about UniDAC.

Post Reply