Subject Login Params
Author Patrick Lenz
This is my login procedure :

procedure Tdm.MyLogin(const USERNAME, PASSWORD, SQLROLE: WideString);
var
myList : TStringlist;
begin
try
mylist := TStringList.Create;
myList.Add('user_name=' + USERNAME);
mylist.Add('password=' + PASSWORD);
mylist.Add('sql_role_name=' + SQLROLE);
try
begin
If db.Connected then db.Disconnect;
db.Params.Clear;
db.Params.AddStrings(MyList);
db.Open;
ibtMain.starttransaction;
end;
except
Raise Exception.Create('sorry - did not log in - try again')
end;
finally
MyList.free;
end;
end;

Now, when when I do a hardcoded:
mylogin('sysdba','masterkey','administrator')
-> it works !!!

but when I call

mylogin(Username,Password,RoleString)
with the following (same) values coming from a login dialog:

Username = 'sysdba'
Password = 'mastyerkey'
RoleString = 'administrator'

I get an E_DATABASE_BLANK error when I try to open the database.

Any ideas ?

Thanks
Patrick







[Non-text portions of this message have been removed]