i have written the code but its giving error,my code is
Expand|Select|Wrap|Line Numbers
- Private Function pass() As Boolean
- Dim cn As New ADODB.Connection
- Dim rs As New ADODB.Recordset
- Dim sql As String
- cn.Open = "provider=microsoft.jet.OLEDB.4.0;Data source=F:\icici\database.mdb;Persist security info=true"
- sql = "update Table1 " & _
- "set Password= '" & Text2.Text & "'" & _
- "where Password= '" & Text1.Text & "'"
- rs.Open sql, cn, adOpenStatic, adLockOptimistic
- cn.BeginTrans
- cn.Execute sql
- cn.CommitTrans
- cn.Close
- MsgBox "password has been changed successfully"
- End Function
- Private Sub Command1_Click()
- Call pass
- End Sub