J
Jim in Arizona
I'm using VS2005/2.0 Framework.
The SQL Server I was working with is MS SQL 2000. I don't know what
build off hand.
I tried to make a small web form to change the password, using this code:
Dim strCTID As String = txtClaimTrakID.Text
Dim strPassword As String = txtCurrentPassword.Text
Dim strNewPassword As String = txtNewPassword.Text
Dim strNewPassword2 As String = txtNewPassword2.Text
Dim strConnection As String
strConnection = "server=sql;database=master;integrated " & _
"security=false;uid=" & strCTID & ";pwd=" &
strPassword
Try
If strNewPassword = strNewPassword2 Then
SqlConnection.ChangePassword(strConnection, strNewPassword)
Else
Response.Write("New Passwords Did Not Match")
End If
Catch ex As Exception
Response.Write(ex.ToString)
End Try
The error I got back was this:
System.InvalidOperationException: ChangePassword requires SQL Server 9.0
or later. at System.Data.SqlClient.SqlConnection.ChangePassword(String
connectionString, String newPassword) at
tests_sqlpasswordchange.btnConnect_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\tests\sqlpasswordchange.aspx.vb:line 22
So, my question is, is there some other method I can use to get the job
done in this manner?
TIA,
Jim
The SQL Server I was working with is MS SQL 2000. I don't know what
build off hand.
I tried to make a small web form to change the password, using this code:
Dim strCTID As String = txtClaimTrakID.Text
Dim strPassword As String = txtCurrentPassword.Text
Dim strNewPassword As String = txtNewPassword.Text
Dim strNewPassword2 As String = txtNewPassword2.Text
Dim strConnection As String
strConnection = "server=sql;database=master;integrated " & _
"security=false;uid=" & strCTID & ";pwd=" &
strPassword
Try
If strNewPassword = strNewPassword2 Then
SqlConnection.ChangePassword(strConnection, strNewPassword)
Else
Response.Write("New Passwords Did Not Match")
End If
Catch ex As Exception
Response.Write(ex.ToString)
End Try
The error I got back was this:
System.InvalidOperationException: ChangePassword requires SQL Server 9.0
or later. at System.Data.SqlClient.SqlConnection.ChangePassword(String
connectionString, String newPassword) at
tests_sqlpasswordchange.btnConnect_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\tests\sqlpasswordchange.aspx.vb:line 22
So, my question is, is there some other method I can use to get the job
done in this manner?
TIA,
Jim