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.
Firebird Embedded and C++ Builder Code
Moderators: gto, cipto_kh, EgonHugeist
Can anyone help me here??
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.
Pointer to some documentation would be enough... perhaps.
Thanks.
Peter.
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.
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;