Page 1 of 1

Firebird Embedded and C++ Builder Code

Posted: 12.01.2006, 12:04
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.

Can anyone help me here??

Posted: 18.01.2006, 13:41
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.

Posted: 02.02.2006, 15:19
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;