أحاول تعديل احدى قيم الجدول في بالكود التالي لكن يطلع لي خطاْ أرجو المساعدة
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim st As String = Val(TextBox1.Text)
Dim pass As String = Val(TextBox2.Text)
Dim connetionString As String
Dim connection As OleDbConnection
Dim oledbAdapter As New OleDbDataAdapter
Dim sql As String
connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Student.mdb;"
connection = New OleDbConnection(connetionString)
sql = "update tblUser set Password = '" & pass & "'where UserName = '" & st & "'"
Try
connection.Open()
oledbAdapter.UpdateCommand = connection.CreateCommand
oledbAdapter.UpdateCommand.CommandText = sql
oledbAdapter.UpdateCommand.ExecuteNonQuery()
MsgBox("تم تعديل كلمة المرور ", MsgBoxStyle.MsgBoxRtlReading + MsgBoxStyle.MsgBoxRight + vbInformation, "المستخدمين")
Catch ex As Exception
MsgBox(ex.ToString)
connection.Close()
End Try
End If
End Sub