Subject Re: [IBO] Opening 2 databases from a single login
Author davidhusarik
--- In IBObjects@y..., Daniel Rail <daniel@a...> wrote:
> At 04/28/2002 07:39 AM, you wrote:
> >I want the user to log into the first database
> >(dmConnection.IBC_Main) but I would like to use the
> >values from the login to get to the second database
> >(dmConnection.IBC_Archive). I have found the property
> >LoginUsername but where is the equivlant for PASSWORD.
> >Or is there an easier way to do this. I am using
> >Delphi 4.0 Professional with service pack 3 and IB
> >Objects 3.6 Dj. Any help is appreciated.
>
> I simply use the USERNAME and PASSWORD properties to do the same
thing.
>
>
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.accramed.ca)

I have tried

with dmConnection.IBC_Archive do
begin
...
username := dmConnection.IBC_Main.username;
password := dmConnection.IBC_Main.password;
...
end;

with dmConnection.IBC_Archive do
begin
...
with Params do
begin
Values['USER NAME'] := dmConnection.IBC_Main.username;
values['PASSWORD'] := dmConnection.IBC_Main.password;
end;
...
end;

Both of these produce ISC Error Code 335544472, ISC Error Message:
Your user name and password are not defined. Ask your administrator
to set up an InterBase login. If I have login prompt set to true for
IBC_Archive I can login to the second database without any problem.
Is there another property that I might have missed.