this form for update user password there is error
ERROR MESSAGE --- No value given for one or more required parameters ERROR MESSAGE IMAGE
My code
CONNECTION CODE
Imports System.Data.OleDb Module Module1
Public Function GetConnection() As OleDb.OleDbConnection
Return New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\mydata.accdb")
End Function
UPDATE BUTTON CODE
Try
con = GetConnection()
con.Open()
Dim str As String
str = "update [usercontrol] set [Password] = '" & TextBox1.Text & "' Where [Username] =" & TextBox3.Text
Dim cmd As OleDbCommand = New OleDbCommand(str, con)
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
MsgBox("New password has been successfully updated", MsgBoxStyle.Information)
clear()
Catch ex As Exception
MsgBox(ex.Message)
If con.State = ConnectionState.Open Then
con.Close()
End If
End Try