i am working on this code for my password change option in my vb6 program. with access as backend. but im encountering errorline "syntax error(missing operator) in query expression on my update statement.
this project is very important to me and i appreciate your future comments. thanks.
this project is very important to me and i appreciate your future comments. thanks.
Code:
Dim cn As New ADODB.Connection
Dim sql As String
cn.Open "provider=microsoft.jet.OLEDB.4.0;Data source=C:\db1.mdb;Persist security info=true"
sql = "update userlog " & _
"set passlog= '" & txtpass.Text & "'" & _
" where passlog= '" & txtold.Text & "'" &_
" where user= '" & Text1.Text & "'"
cn.Execute (sql)
cn.Close
Set cn = Nothing
Comment