Solved

how to login a computer?

Posted on 2002-05-31
8
227 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
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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