You need to use the store proc sp_password. It's documented in BOL.
>I know have my application users logging into SQL Using the SQL Users/Logins. How do I change the password on a sql user from within code? My users have to change passwords every x days, during the login process, I determine if the x days is reached and if so, prompt them for a new password. But now that I'm using the SQL users/logins I don't know how to do that.
>
>I'm assuming I'll be able to do something like this?
>
>
>update sysusers set password=?lcNewPassword where username=user_name()
>
>
>Thanks
>Kirk
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer