hi.. i'm having problem w/ my UPDATE SYNTAX .. I CAN'T FIGURE OUT WHAT'S WRONG WITH MY SYNTAX.. PLEASE HELP ME.. I REALLY NEED TO FINISH THIS FOR MY DTR SYSTEM THESIS.. i can't move on to my other codes.. please...
--the error that i get is.. UPDATE SYNTAX ERROR..
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
i = MessageBox.Show("Are you sure you want to Update the record?", "Confirm Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If i = MsgBoxResult.Yes Then
constr = "UPDATE tblEmployee SET LastName='" & txtLName.Text _
& "',FirstName='" & txtFName.Text _
& "',MI='" & txtMI.Text _
& "',Gender='" & cbGender.Text _
& "',Status='" & cbStatus.Text _
& "',BirthDate='" & DateTimePicker1.Text _
& "',Age='" & lblAge.Text _
& "',Religion='" & txtReligion.Text _
& "',BirthPlace='" & txtBirthplace.Text _
& "',Department='" & cbDepartment.Text _
& "',Address='" & txtAddress.Text _
& "',MobileNo='" & mskMobNo.Text _
& "',Access='" & txtAccess.Text _
& "',IDNumber='" & mskIDNo.Text _
& ",Password='" & txtPassword.Text _
& "',Position='" & cbPosition.Text _
& "',Shift='" & cbShift.Text _
& "',SSSNumber='" & txtSSS.Text _
& "',TIN='" & txtTIN.Text _
& "',PhilHealth='" & txtPhilHealth.Text _
& "',PAG-IBIG='" & txtPAGIBIG.Text _
& "' WHERE EmployeeNo=" & txtEmpNo.Text
cmd = New OleDbCommand(constr, cn)
cn.Open()
i = cmd.ExecuteNonQuery()
MessageBox.Show(i & " Record Updated Successfully!", "Techno-Time Software", MessageBoxButtons.OK, MessageBoxIcon.Information)
cn.Close()
End If
Remove_Binding()
Create_Table()
Add_Binding()
End Sub