Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
conn.Open()

Dim cmd As New OleDbCommand("Update (SELECT Employee.empno, Employee.emplname, Employee.empfname, Employee.empmidname, Employee.contactno, Admin.description FROM Admin INNER JOIN Employee ON Admin.adminNo = Employee.adminNo) Set emplname=?, empfname=?, empmidname=?, contactno=?, description=? where empno=?", conn)
cmd.Parameters.Add("empno", OleDbType.Integer)
cmd.Parameters.AddWithValue("emplname", OleDbType.Char)
cmd.Parameters.AddWithValue("empfname", OleDbType.Char)
cmd.Parameters.AddWithValue("empmidname", OleDbType.Char)
cmd.Parameters.AddWithValue("contactno", OleDbType.Integer)
cmd.Parameters.Add("description", OleDbType.Char)
cmd.Parameters("empno").Value = empno.Text
cmd.Parameters("emplname").Value = lname.Text
cmd.Parameters("empfname").Value = fname.Text
cmd.Parameters("empmidname").Value = midname.Text
cmd.Parameters("contactno").Value = contactno.Text
cmd.Parameters("description").Value = description.Text
cmd.CommandType = CommandType.Text

Dim oleAdapter As New OleDbDataAdapter
oleAdapter.UpdateCommand = cmd
oleAdapter.UpdateCommand.ExecuteNonQuery()


MsgBox("Record Updated!", MsgBoxStyle.Information)
conn.Close()
End Sub

I used microsoft access database but as I run the program and edit a record it would say "Record Updated!" but when I checked it inside the ms access, it never updated..as in no changes at all

How should I do with it?
Thanks on any help I could receive to resolve it:D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.