Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread silent login
Fri, Aug 15 2008 4:29 AMPermanent Link

"Iztok Lajovic"
I want to login silently to session in my application. I have following
code:

if not session.Connected then with session do begin
   loginUser     := 'Administrator';
   loginPassword := 'EDBDefault';
   session.SessionType := stLocal;
   session.open;
   if session.Execute('select * from databases where name = ' +
engine.QuotedSQLStr('MyDatabase')) = 0 then begin    <<<<<< login dialog!!!
       :::::
   end;
end;

When trying to execute SQL against configuration database the login dialog
opens requesting user name and password.

If I understand manual correctly then when both session.loginUser and
session.loginPassword are assigned with code the login dialog should not
appear. What I am missing?

Iztok Lajovic

Fri, Aug 15 2008 10:06 AMPermanent Link

"Iztok Lajovic"
I found the reason for login dialog appearance - it was my typo.

Thank you
Iztok Lajovic



"Iztok Lajovic" <iztok.lajovic@amis.net> je napisal v sporočilo
news:A6DF76FD-DC1B-4EC5-A41F-1E3EC6FF3E42@news.elevatesoft.com ...
>I want to login silently to session in my application. I have following
>code:
>
> if not session.Connected then with session do begin
>    loginUser     := 'Administrator';
>    loginPassword := 'EDBDefault';
>    session.SessionType := stLocal;
>    session.open;
>    if session.Execute('select * from databases where name = ' +
> engine.QuotedSQLStr('MyDatabase')) = 0 then begin    <<<<<< login
> dialog!!!
>        :::::
>    end;
> end;
>
> When trying to execute SQL against configuration database the login dialog
> opens requesting user name and password.
>
> If I understand manual correctly then when both session.loginUser and
> session.loginPassword are assigned with code the login dialog should not
> appear. What I am missing?
>
> Iztok Lajovic
>

Image