I have been working on developing a MS Access application that will allow some coworkers to easily interact with data on our SQL Server. The program is about done, but one little thing remains- allowing a user to change their SQL Server password through the MS Access front-end. I have been googling my little heart out, but after a while everything starts to look the same (even if the answer is right in front of me!).
I found a couple links that are helpful, but I can't quite make the leap on how to apply it to my VBA program.
Change expired password without "Password Expired dialog box"
How can I change SQL Server login account password on first login via C#?
http://www.utteraccess.com/forum/Users-Change-SQL-Pass-t2006545.html&pid=2378998
My current connection string looks like this
Dim cn As ADODB.Connection
Dim strCS As String
Set cn = New ADODB.Connection
strCS = "Provider=SQLOLEDB;" _
& "Server=IP ADDRESS GOES HERE;" _
& "Database=" + DBselect.Value + ";" _
& "User ID=" + Uname.Value + ";" _
& "Password=" + pWord.Value + ";" _
& "MARS Connection=True;"
cn.ConnectionString = strCS
cn.Open
This connection string works perfectly fine as long as the user's password hasn't expired.
How would I modify this connection string to change a users password? Any help is really appreciated!
Thanks!