Arabzade
asked on
Sending login information from client side to App. server
Hi.
I'm working on a 3-tiered client/server project using Delphi 4,
Sql Server 6.5,Dcom.
I'd like to have login prompt on client side ,so that I enabled login
prompt on TREMOTESERVER but i don't know how application server
can verify this information.
Thanks a lot
I'm working on a 3-tiered client/server project using Delphi 4,
Sql Server 6.5,Dcom.
I'd like to have login prompt on client side ,so that I enabled login
prompt on TREMOTESERVER but i don't know how application server
can verify this information.
Thanks a lot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
listening...
ASKER
Hi ShadowFax
Thanks for the help.
If it's possible for you,write a simple code for
2nd paragraph.
Best Regards
Arabzade
Thanks for the help.
If it's possible for you,write a simple code for
2nd paragraph.
Best Regards
Arabzade
Hi Arabzade,
Sure, here goes:
procedure TMyRemoteDM.CheckLogon(Sta ffNo: Integer; const Password: WideString): WordBool;
begin
Result := False ;
if MyQuery.Active then
MyQuery.Close ;
MyQuery.ParamByName('Staff No').AsInt eger := StaffNo ;
MyQuery.ParamByName('Passw ord').AsSt ring := Password ;
MyQuery.Open ;
if not MyQuery.IsEmpty then
Result := True ;
end;
If you've got any further questions just let me know.
Glad to help.
Gavin
Sure, here goes:
procedure TMyRemoteDM.CheckLogon(Sta
begin
Result := False ;
if MyQuery.Active then
MyQuery.Close ;
MyQuery.ParamByName('Staff
MyQuery.ParamByName('Passw
MyQuery.Open ;
if not MyQuery.IsEmpty then
Result := True ;
end;
If you've got any further questions just let me know.
Glad to help.
Gavin
First of all add a new method to your inteface of your RemoteDataModule in your application server. Set it's invoke kind to Function, set it's return type to WordBool and add two parameters: UserCode and Password. Click refresh of the type library and close it.
Then flesh out the procedure in the RemoteDataModule with something like opening the query with the UserCode/Password parameters and return True to the Result of the Function if the queries IsEmpty or EOF/BOF = False;
Then in you ClientApp Create a small screen at startup/create and force the user to enter his UserCode/Password, then call your new function from your RemoteAppServer like this: DCOMConnection.AppServer.M
HTH
Gavin