Quantcast
Channel: CodeGuru Forums - Visual Basic 6.0 Programming
Viewing all articles
Browse latest Browse all 736

[RESOLVED] Change Password Error

$
0
0
Hello Sir,

I am Create login form then change password form.. Heres my code
i dont get it what is the problem of my code, VB 6 Say: Syntax Error Upadate Statement
Code:

Private Sub cmdOk_Click()
Dim rs As New ADODB.Recordset
Dim change As String



If txtOld.Text = Login.txtPassword.Text Then
rs.Open "Select Password From tblUser where UserID = '" & MDIForm1.id.Caption & "'", acd, adOpenForwardOnly

change = "UPDATE tblUser SET Password ='" & txtNew.Text & "' where UserID = '" & MDIForm1.id.Caption & "'"
acd.Execute change

MsgBox "Change"
Else
MsgBox "Invalid Old Password"
     

End If

End Sub

Help me sir thanks

Viewing all articles
Browse latest Browse all 736

Trending Articles