Solved

how to login a computer?

Posted on 2002-05-31
8
224 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now