PC Review


Reply
Thread Tools Rate Thread

How can test the pw for Sql Server 2000

 
 
ad
Guest
Posts: n/a
 
      10th Feb 2005
I want a user input the password of sa of Sql Server 2000.

How can I test if the password is correct?


 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      10th Feb 2005
"ad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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


 
Reply With Quote
 
Nick Malik [Microsoft]
Guest
Posts: n/a
 
      10th Feb 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I want a user input the password of sa of Sql Server 2000.
>
> How can I test if the password is correct?
>
>



 
Reply With Quote
 
RCS
Guest
Posts: n/a
 
      10th Feb 2005
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]" <(E-Mail Removed)> wrote in message
news:BMadnReJWa0xhZbfRVn-(E-Mail Removed)...
> try to connect to SQL Server. If you are able to connect, the password is
> correct.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test win2003 server - DHCP server unreachable problem Eco Microsoft Windows 2000 DNS 4 16th Jul 2006 02:47 AM
PHP, Apache, 2000 Test Server =?Utf-8?B?S2ltQk9Q?= Microsoft Windows 2000 0 28th Mar 2006 05:09 PM
2003 terminal server licences on 2000 AD domain which hosts 2000 licence server ? scott Microsoft Windows 2000 Networking 1 21st Jun 2005 03:07 PM
Re: The server response was: 550 5.7.1 <test@test.com>... we do not relay S. Justin Gengo Microsoft ASP .NET 0 6th Aug 2003 04:15 PM
attaching a NT4 stand alone server into a Win2k server AD test environment Mike Smith Microsoft Windows 2000 Networking 2 17th Jul 2003 09:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:12 AM.