Subject | Re: [firebird-support] How can I change the path to the database file????? |
---|---|
Author | Helen Borrie |
Post date | 2005-06-23T08:52:18Z |
At 07:59 AM 23/06/2005 +0000, you wrote:
in your application.
On the production server, confgure that alias in aliases.conf. The path
*must* be the absolute path location as seen by the server - not a share
or a mapping.
The aliases.conf entry would be
MyAlias = C:\MaxControl2\Maxximus.GDB
Note that, even if path on your development system is different, your
application will still connect properly, provide you have the correct
database path configured on your development host server.
referring the Windows Named Pipes network protocol. In this case, your
application code must access the database in this form:
\\My_Server\MyAlias
However, Win Named Pipes is a very noisy protocol. You will get better
response if you use the TCP/IP protocol, which has this connection format
for your alias:
My_Server:MyAlias
applicable to Firebird 1.0. With the Firebird 1.5 aliasing you don't need
any sort of script. You might prefer to write a script to set up the alias
correctly, though of course it is a quick and easy thing to do it manually,
if you know the path of the database file.
available for v.1.5 all along.
./heLen
>Hello all,Don't hard-code an database paths into your application, but use an alias
>
>I have a Database Program (MaxControl2)and it uses firbird. When I
>install the program it installs all of its files in C:\MaxControl2.
>I can see the executable and the database file (Maxximus.GDB) along
>with .ddl's, Isu's, DAT's and other files it needs to operate. There
>are 2 configuration files, but they don't appear to offer any line
>item that allows you to change the location of the database file.
>
>Could it be that I just add a new section, example: [SYSTEM] then
>define my path?
>
>Is there a way to tell the program to look for its database file at
>\\My_Server\C:\MaxControl2?
in your application.
On the production server, confgure that alias in aliases.conf. The path
*must* be the absolute path location as seen by the server - not a share
or a mapping.
The aliases.conf entry would be
MyAlias = C:\MaxControl2\Maxximus.GDB
Note that, even if path on your development system is different, your
application will still connect properly, provide you have the correct
database path configured on your development host server.
>Our company started out with 1 computer and we now need 3 computersYour client machines must access the host machine as a server. I see you
>to access the same database file.
referring the Windows Named Pipes network protocol. In this case, your
application code must access the database in this form:
\\My_Server\MyAlias
However, Win Named Pipes is a very noisy protocol. You will get better
response if you use the TCP/IP protocol, which has this connection format
for your alias:
My_Server:MyAlias
>As I have already tried to figure a way to do this, I come up withI'm not familiar with this but it could be some kind of workaround
>ideas from the Unofficial Firebird Installation page at
>
>http://www.alanti.net/firebird/inst/index.html
>
>It appears that some sort of script might be able to help me?
applicable to Firebird 1.0. With the Firebird 1.5 aliasing you don't need
any sort of script. You might prefer to write a script to set up the alias
correctly, though of course it is a quick and easy thing to do it manually,
if you know the path of the database file.
>Am I on the right track? Or lost?Can't tell. :-)
>I have tried to follow the instructions to generate a script, but theI think the stuff you have read must be pretty old. Aliasing has been
>script file is very complicated. If I am on the right track does
>anyone have an example script that can help me understand what all
>the paramerters are?
>
>Logically thinking, it seems i have to somehow fool, or redefine the
>program into thinking its database is in a different location.
available for v.1.5 all along.
./heLen