Solved

Sending login information from client side to App. server

Posted on 2000-04-04
5
202 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:Arabzade
  • 3
5 Comments
 

Expert Comment

by:ShadowFax
ID: 2686609
Hi Arabzade,

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.MyFunction(UserCode,Password), if the funtion returns true then run the application, or else terminate(close) it.

HTH

Gavin
0
 

Accepted Solution

by:
ShadowFax earned 50 total points
ID: 2686697
Sorry Arabzade,
the above was meant to be a proposed answer.

Cheers

Gavin
0
 
LVL 4

Expert Comment

by:Radler
ID: 2702021
listening...
0
 

Author Comment

by:Arabzade
ID: 2703421
Hi ShadowFax

   Thanks for the help.
If it's possible for you,write a simple code for
2nd paragraph.

  Best Regards
  Arabzade
0
 

Expert Comment

by:ShadowFax
ID: 2746554
Hi Arabzade,

Sure, here goes:

procedure TMyRemoteDM.CheckLogon(StaffNo: Integer; const Password: WideString): WordBool;
begin
  Result := False ;
  if MyQuery.Active then
    MyQuery.Close ;
  MyQuery.ParamByName('StaffNo').AsInteger := StaffNo ;
  MyQuery.ParamByName('Password').AsString := 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
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question