Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling sp_password SP in SQL Server

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
Hi all,

I am trying to create an interface for our intranet so users can change their passwords to their SQL Server 2005 user id accounts. Whether it is for SQL Server 2000 or 2005, when I call the sp_password stored procedure, the returned results are not sent as flags, as I believe this SP was intended to be run from Query Analyzer, while I am calling it from my ASP webpage on the server.

The results always will fail if compared against the returned value, and will always succeed if compared against the error bit, as that is always zero no matter what (whether the password change was a success or not.)

Short of creating a new connection after the change for the ID to test and see if it works, is there any way anyone can think of to create this user interface so they can change their SQL ID password's, and for me to be able to know whether it was a success or not? Are there any other stored procedures anyone is aware of for this type of action that would return a Bit datatype value, etc?


-Ovatvvon :-Q
 
search for ALTER LOGIN (Transact-SQL) on SQL Server BOL (Books Online)

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top