Unidac and FireBird

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Unidac and FireBird

Post by FerCastro » Wed 31 Oct 2012 18:19

Hello

I am trying to run my application under Windows 2003 Server. I have the release 2.5.0.26075 Firebird 2.5 of the FB Server running as a service.

Simply I can not stablish the connection to the FB service, althoug the parameters are correct. I have not the service running on my laptop, i must say.

Is something a I missing?

Thanks and best regards

Fernando Castro
México, D.F.

AndreyZ

Re: Unidac and FireBird

Post by AndreyZ » Thu 01 Nov 2012 09:18

Hello,

Here is a code example that demonstrates connecting to a Firebird database using UniDAC:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  UniConnection1.ProviderName := 'InterBase';
  UniConnection1.Server := 'localhost'; // you can leave the Server property blank. In this case, the local protocol will be used instead of TCP.
  UniConnection1.Username := 'sysdba';
  UniConnection1.Password := 'masterkey';
  UniConnection1.Database := 'database_path'; // for example, C:\my.fdb
  UniConnection1.SpecificOptions.Values['ClientLibrary'] := 'fbclient.dll';
  UniConnection1.LoginPrompt := False;
  UniConnection1.Open;
end;
If you cannot connect to your Firebird database using this code, please specify the exact error that occurs while executing it.

FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Re: Unidac and FireBird

Post by FerCastro » Fri 02 Nov 2012 03:15

Dear AndreyZ,

Thanks for your help, it's already solved.

AndreyZ

Re: Unidac and FireBird

Post by AndreyZ » Fri 02 Nov 2012 08:35

It is good to see that the problem was solved. If any other questions come up, please contact us.

tromani
Posts: 5
Joined: Tue 23 Jun 2015 20:46

Re: Unidac and FireBird

Post by tromani » Tue 23 Jun 2015 20:49

I tryed your code
so i have got:

INTERBASE is not licensed

but i'am using firebird, not interbase

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Unidac and FireBird

Post by ViktorV » Fri 26 Jun 2015 10:21

tromani wrote:I tryed your code
so i have got:

INTERBASE is not licensed

but i'am using firebird, not interbase
The error occurs when you are trying to connect to Firebird using non-licensed Interbase client library. If the ClientLibrary property of the TUniConnection components is set to an empty string, then UniDAC itself will search for the client library - and, probably, load the Interbase client library.
Please make sure you are using the Firebird client library when connecting to Firebird. For this, write the full path to the Firebird client library in the ClientLibrary property of the TUniConnection component. For example:

Code: Select all

UniConnection1.SpecificOptions.Values['ClientLibrary'] := 'c:\Firebird\fbclient.dll';

tromani
Posts: 5
Joined: Tue 23 Jun 2015 20:46

Re: Unidac and FireBird

Post by tromani » Sat 27 Jun 2015 16:26

no
library is set like you post

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Unidac and FireBird

Post by ViktorV » Fri 03 Jul 2015 10:16

This error may occur when Firebird and InterBase services are running on the computer simultaneously (the InterBase service is installed by default when installing RAD Studio). Your application may attempt to connect to InterBase, since the connection port is the same for InterBase and Firebird by default - 3050
Please check whether the InterBase service is running. If it is, stop the InterBase service and check whether the error is still reproduced.
Note: to prevent the InterBase service to start automatically, you can select the Disabled value for the Start Type option in the InterBase service settings.

Post Reply