Subject | Re: [firebird-support] Check if an alias is defined |
---|---|
Author | Helen Borrie |
Post date | 2007-08-20T22:35:19Z |
At 08:07 AM 21/08/2007, you wrote:
sense for client applications to be able to query the contents of the
configuration file!
client business.
true if it succeeds, false if it returns an exception.
./heLen
>Hello:Since aliasing is primarily a security measure, it would hardly make
>
>I use FireBird 2.0, Delphi 5 and IBX.
>
>Suppose the file aliases.conf in the server has the following lines:
>
>MyDB1 = C:\MyDataBases\Data1.FDB
>MyDB2 = C:\MyDataBases\Data2.FDB
>
>If my application is running in a client PC... is there a way to know
>if some alias is defined?
sense for client applications to be able to query the contents of the
configuration file!
>What I need is a function that has aThere isn't. The existence of an alias is server business, not
>parameter for an alias name and returns true or false. If this
>function exists (suppose its name is CheckIfAliasExists) it should be
>used like the following:
>
>var
> AliasExists: Boolean;
>begin
> AliasExists:=CheckIfAliasExists('MyDB1') { This should return
>True }
> AliasExists:=CheckIfAliasExists('MyDB2') { This should return
>True }
> AliasExists:=CheckIfAliasExists('MyDB3') { This should return
>False }
>end;
>
>
>Does anybody know if there is a function like CheckIfAliasExists
client business.
> or how can I do it?Write a function that attempts to connect using the alias and returns
true if it succeeds, false if it returns an exception.
./heLen