here is my code in edit button:
Dim con As New OleDbConnection("Provider = Microsoft.jet.oledb.4.0; Data Source =" & Server.MapPath("SubjectM.mdb"))
con.Open()
Dim edit As String
edit = "Update SubjectM set title = '" & txttitle.Text & "' and prereq = '" & txtprereq.Text & "' where code = '" & txtcode.Text & "'"
Dim com As New OleDbCommand(edit, con)
com.ExecuteNonQuery()
con.Close()
Panel1.Visible = False
adssubject.SelectCommand = "Select code, title, prereq from SubjectM"
End Sub
Dim con As New OleDbConnection("Provider = Microsoft.jet.oledb.4.0; Data Source =" & Server.MapPath("SubjectM.mdb"))
con.Open()
Dim edit As String
edit = "Update SubjectM set title = '" & txttitle.Text & "' and prereq = '" & txtprereq.Text & "' where code = '" & txtcode.Text & "'"
Dim com As New OleDbCommand(edit, con)
com.ExecuteNonQuery()
con.Close()
Panel1.Visible = False
adssubject.SelectCommand = "Select code, title, prereq from SubjectM"
End Sub