Subject | How we do client - server |
---|---|
Author | GrumpyRain |
Post date | 2004-11-16T02:11:06Z |
This is how we do client server in firebird. It is not the only way,
but it works even over the internet (providing firewalls let 3050
through and forward it to the right machine).
For the purpose of this example, I will assume the computer name for
the server machine is "dbserver" . Edit aliases.conf inside the
firebird installation folder on the "dbserver", and add the line:
totalbook = c:\totalbook\totalbook.fdb
This sets up the alias totalbook to point to the file location. I like
aliases because it makes it easy to move the database at a later stage.
Now from any machine, you can just set the database name to
"dbserver:totalbook". The only thing you need is the fbclient.dll in
your folder with the executables in it.
For simplicity, I even use that connection string from the server. It
does use the TCP layer unnecessarily as the server, but in our case it
is not that much overhead. You don't need any networked drives or
shared folders for it to work. All comms is done by fbclient.dll over
port 3050 automatically (unless you change it to another port).
Hope that helps
but it works even over the internet (providing firewalls let 3050
through and forward it to the right machine).
For the purpose of this example, I will assume the computer name for
the server machine is "dbserver" . Edit aliases.conf inside the
firebird installation folder on the "dbserver", and add the line:
totalbook = c:\totalbook\totalbook.fdb
This sets up the alias totalbook to point to the file location. I like
aliases because it makes it easy to move the database at a later stage.
Now from any machine, you can just set the database name to
"dbserver:totalbook". The only thing you need is the fbclient.dll in
your folder with the executables in it.
For simplicity, I even use that connection string from the server. It
does use the TCP layer unnecessarily as the server, but in our case it
is not that much overhead. You don't need any networked drives or
shared folders for it to work. All comms is done by fbclient.dll over
port 3050 automatically (unless you change it to another port).
Hope that helps