Page 1 of 1

How to use AddAlias method in TIBCServerProperties?

Posted: Thu 10 Mar 2011 14:12
by Teomir
Hi!

Need help! How to use AddAlias method in TIBCServerProperties??

Delphi7/FireBird 2.5

i write so..

In Options properties [poDBAlias]...
Server = localhost(127.0.0.1)

with ServerProp do
begin
Params.Clear;
Params.Add('user_name=' + AdminName);
Params.Add('user_pass=' + AdminPass);

try
Attach; // Here is ok.. Service is attached...

AddAlias(MyAliasName, MyDatabasePath) /// here is error...

// return Error: Unrecognized service parameter block

finally
Detach;
end;
end;

Posted: Thu 10 Mar 2011 15:51
by AndreyZ
Hello,

You can use the AddAlias method only for Interbase, Firebird doesn't support this functionality.

Posted: Thu 10 Mar 2011 16:08
by Teomir
Thanks!

There are other variants of the decision of the problem on FB??
Dynamic alias creation..

Posted: Fri 11 Mar 2011 11:11
by AndreyZ
You cannot programmatically add alias with Firebird. You can do this only manually by adding alias to the aliases.conf file.