Firebird Embedded and C++ Builder Code

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
pnunn
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 04.10.2005, 03:23
Location: Melbourne

Firebird Embedded and C++ Builder Code

Post by pnunn »

Hi Folks,

got my app working fine with Firebird C/S but have just discovered that there is an embedded version of the server which looks like it would do the job for me better.

But... I don't seem to be able to connect to the server.

I think its because of the connection string I'm using, but I can't get it right.

I'm using localhost and the C/S tcp/ip port, but I'm guessing that's not right.

Can't seem to find any info anywhere though.

Any help?

Ta.

Peter.
pnunn
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 04.10.2005, 03:23
Location: Melbourne

Can anyone help me here??

Post by pnunn »

Come on.. what's the point in having forums or an embedded version of firebird if no one can help use it??

Pointer to some documentation would be enough... perhaps.

Thanks.

Peter.
cariad
Junior Boarder
Junior Boarder
Posts: 36
Joined: 20.10.2005, 14:07

Post by cariad »

Hello,

No, you can't just use localhost (that would assume the server is running which is not the case). Just use the filename as the database name, and an empty host.

Code: Select all

Connection := TZConnection.Create(myOwner);

  Connection.Protocol := 'firebird-1.5';
  Connection.HostName := '';
  Connection.Database := ExtractFileDir(application.Exename)+'\foobar.fdb';
  Connection.User := 'sysdba';
  Connection.Password := 'masterkey';

  Connection.Connect;
Post Reply