473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How can test the pw for Sql Server 2000

ad
I want a user input the password of sa of Sql Server 2000.

How can I test if the password is correct?
Nov 16 '05 #1
3 924
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:OB**************@TK2MSFTNGP14.phx.gbl...
I want a user input the password of sa of Sql Server 2000.

How can I test if the password is correct?


Get the user to type the password into a TextBox
Postback
Build up a ConnectionString including the contents of the TextBox
Instantiate an ADO.NET Connection object using the ConnectionString
Try to open the Connection and trap for any SQL Server errors
Nov 16 '05 #2
try to connect to SQL Server. If you are able to connect, the password is
correct.

Some apps don't try to connect. In those apps, they usually ask the user to
enter the password twice, and then they store the password encrypted until
it is needed.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:OB**************@TK2MSFTNGP14.phx.gbl...
I want a user input the password of sa of Sql Server 2000.

How can I test if the password is correct?

Nov 16 '05 #3
RCS
I actually chuckled aloud at that!! :-)

I guess a person could catch the SqlException and see what it says for a
known bad password - and then handle it that way. But also handle it
appropriately if the server isn't found, the name can't be resolved or if
the wrong provider is specified, etc..
"Nick Malik [Microsoft]" <ni*******@hotmail.nospam.com> wrote in message
news:BM********************@comcast.com...
try to connect to SQL Server. If you are able to connect, the password is
correct.

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Moosebumps | last post by:
I'm trying to test out Python XML-RPC for the first time, and can't find anything that executes a call end to end. I thought that I would use SimpleXMLRPCServer to run a simple server on...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
2
by: len | last post by:
I am in a situation where I need to get a copy of test database that is on production server running MSSQL 2000 Standard to my local machine running MSSQL 2000 personel. I tried to use the copy...
3
by: Rick | last post by:
Hello, I ran Microsoft's free "Web Application Stress" tool to see how asp.net/c# performed against html. Are these results typical? Network: WAS ran on a server with a t3 Internet...
1
by: Paul Brady | last post by:
In a self-contained database, the following query works fine and returns courses taken on 3/8/2000: ---------- SELECT TransactionCourses.CourseID, TransactionCourses.MbrID,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.