Solved

how to login a computer?

Posted on 2002-05-31
8
230 Views
Last Modified: 2010-04-04
i want do some program in delphi. my database is mssql2000.when i connect the mssql,i must login the computer with mssql,but the client maybe not login the server! how can i login the server in my delphi program?
0
Comment
Question by:sunrains
[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
8 Comments
 
LVL 9

Expert Comment

by:ginsonic
ID: 7048315
interested, too.
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 7048325

 
0
 
LVL 4

Accepted Solution

by:
nestorua earned 100 total points
ID: 7048742
HI,
When you register your MSSQL Server use SQL Server login info
, not Windows NT login info.
And you don't need to login in the computer with MSSQL Server,
only to the MSSQL Server itself.
Sincerely,
Nestorua.
0
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!

 

Author Comment

by:sunrains
ID: 7049163
the MSSQL Server is W2k,the Client is Win98Se or W2k professional. my Delphi application use ADO connect the MSSQL Server. and the client is not install MSSQL Server.
0
 
LVL 12

Assisted Solution

by:Lee_Nover
Lee_Nover earned 100 total points
ID: 7049218
ah so you want to do something like a service ?
that can run even if a user isn't logged on to the computer ?

I suggest using SvCom
it can crate an application that runs as a service on NT plaforms and as normal exes on 9x platforms

you could create two separate apps
one to run on win9x and one for NT

another way is to create a wrapper for NT Services
then uppon application startup you check what platform is the app run on
if it's win 9x then use RegisterServiceProcess to register your app as a "service"
to make windows run your app automaticall uppon boot (not user login) you have to add a registry entry in the HKLM\software\microsoft\windows\currentversion\runservices\ key

here's my wrapper function for this :

uses Registry;
function AutoRunApp(const Name: string; const Enabled: Boolean = true): Boolean;
const RunWhere = '\Software\Microsoft\Windows\CurrentVersion\RunServices';
begin
     Result:=false;
     with TRegistry.Create do
       try
          RootKey:=HKEY_CURRENT_USER;
          if OpenKey(RunWhere, true) then
             try
                if Enabled then
                   WriteString(Name, ParamStr(0))
                else
                   DeleteValue(Name);
                Result:=true;
             finally
                CloseKey;
             end;
       finally
          Free;
       end;
end;


for an NT Service wrapper you can use KOL Service
http://bonanzas.rinet.ru/
http://bonanzas.rinet.ru/e_servsock.htm for direct link :)


...
0
 
LVL 5

Expert Comment

by:Hamlet081299
ID: 7050072
I find the best way of connecting to MSSQL in Delphi is by using the ADO components.

As a rule I will have some sort of configuration (ini or registry) that tells the app which connection file to use.

The connection file is a microsoft datalink file (".udl" extension).  Here you can specify the username and password.
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010398
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between Lee_Nover and nestorua

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: 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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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