Subject | Re: database aliases |
---|---|
Author | Adam |
Post date | 2005-02-20T22:44:16Z |
I should probably clarify (or repeat what Daniel said). There is no
way (that I know of) that you can extract this information out of
firebird.
surgery, remove any thing after a # or =, and remove whitespace. You
can use a simple indy client server app to send this information upon
request. In fact, REMObjects is simply a wrapper around indy which
takes care of the nitty gritty connection stuff, and allows you just
to call an interface. Actually, it is a lot more than that, but I
just suggested it because you could do what you want in about 10
lines of code.
firebird, because then it became practical to merge databases from
different sites (same company though).
as you update the aliases.conf file, FB automatically and instantly
looks at the new path, which tells me it is read in when the
connection is established, but that is just a guess. If my guess is
right, then fb just looks at the db path when connection is
established. I certainly wouldn't expect it to "know" anything about
other dbs.
Other stuff:
Is it safe to assume you have the only FB firebird on the server, or
will you introduce another project down the line using FB?
It may be easier to create a simple database with a single table
ProgramName AliasName
-----------------------
Prog1 TestProgSite1
Prog1 TestProgSite2
Prog1 TestProgSite3
etc
That way you could query this database based on your program name,
and get a list of valid aliases.
Adam
way (that I know of) that you can extract this information out of
firebird.
> > A better solution would be to write a service that sits on thethe
> server
> > using Remobjects or equivalent that you could create a call
> > GetAliasConf that returned you the string, then call this from the
> > client application.
>
> Yes, but I'm not familiar with RemObjects. I'm only interested in
> alias names which are in the aliases.conf file, not in the pathYou can write your own parser for the ini file, it is not brain
> itselfs to the databases.
>
surgery, remove any thing after a # or =, and remove whitespace. You
can use a simple indy client server app to send this information upon
request. In fact, REMObjects is simply a wrapper around indy which
takes care of the nitty gritty connection stuff, and allows you just
to call an interface. Actually, it is a lot more than that, but I
just suggested it because you could do what you want in about 10
lines of code.
> In a former version of my app, based on Paradox tables , it wasAh, been there, but our need for that ceased when we went to
> possible to work with differend BDE aliases to switch between
> different data. It was easy to call all available aliases from BDE.
firebird, because then it became practical to merge databases from
different sites (same company though).
> Actually I'm interestet in the theoretical possibility to askFirebird
> server for the available aliasnames from aliases.conf .I don't know if FB knows this or looks it up. It seems that as soon
as you update the aliases.conf file, FB automatically and instantly
looks at the new path, which tells me it is read in when the
connection is established, but that is just a guess. If my guess is
right, then fb just looks at the db path when connection is
established. I certainly wouldn't expect it to "know" anything about
other dbs.
Other stuff:
Is it safe to assume you have the only FB firebird on the server, or
will you introduce another project down the line using FB?
It may be easier to create a simple database with a single table
ProgramName AliasName
-----------------------
Prog1 TestProgSite1
Prog1 TestProgSite2
Prog1 TestProgSite3
etc
That way you could query this database based on your program name,
and get a list of valid aliases.
Adam
>
> Ulrich