Subject | Check if an alias is defined |
---|---|
Author | gstv_m |
Post date | 2007-08-20T22:07:29Z |
Hello:
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? What I need is a function that has a
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 or
how can I do it?
Thanks in advance.
Gustavo
P.S.: I am posting this message directly from the web because I sent
it twice from my Outlook Express and it didnĀ“t arrive to the forum.
Which may be the problem?
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? What I need is a function that has a
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 or
how can I do it?
Thanks in advance.
Gustavo
P.S.: I am posting this message directly from the web because I sent
it twice from my Outlook Express and it didnĀ“t arrive to the forum.
Which may be the problem?