Solved

Sending login information from client side to App. server

Posted on 2000-04-04
5
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month3 days, 19 hours left to enroll

630 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