Subject [IBO] Re: Connection problems next
Author hypmarie23
Thanks a lot helen for your help.

it works now with aliases.cfg and the following code :
with IB_Connection1 do
begin
Connected := False;
LoginPrompt := False;
Username := 'SYSDBA';
Password := 'masterkey';
Server := '';
Path := 'cocagneFC';
Protocol := cpTCP_IP;
DefaultTransaction := IB_Transaction1;
Connected := true;
end;

Thanks to the other contributors.

--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 07:10 AM 3/06/2006, you wrote:
> >hello,
> >
> > > How is the alias name entered in the path ?
> >
> >IB_Connection1.DatabaseName := 'cocagneFC';
> >
> >The Path property is automatically set by the component, based on
the
> >DatabaseName value, and you shouldn't never use it directly.
>
> No, that is exactly the reverse of the fact. For an
ib_connection,
> you should not touch the DatabaseName value. It is only there for
> backward compatibility with the BDE. You should use Server, Path
and Protocol.
>
> By default, when you set the Server, Path and Protocol properties,
> IBO will construct DatabasePath.
>
> So: Suppose the following:
>
> Server: localhost
> Path: cocagneFC (your alias)
>
> Here is the DatabasePath that IBO makes for each Protocol case --
>
> Protocol cpLocal: cocagneFC
> Protocol cpTCP_IP: localhost:cocagneFC
>
> Forget Protocol cpNetBeui, it doesn't work with aliases.
>
> In fact, the best thing you can do is change the DatabasePath
value
> to some simple thing, e.g. cfc. In some places you will be able
to
> refer to it by that name. However, the main thing here is that,
once
> you assign your own private value to it, IBO won't touch it again.
>
> Helen
>