I
Ibajat
Hi everyone!
I'm having a problem with my database and I just can't find the solution for
this.. I am just doing a database in VB NET linked with Access, everything is
fine until I want to edit/update the data that is already in the Database.
It just saves the information on VB NET but it does not pass the edited
information to Access... I dont know where my mistake is and I already
searched a lot...
Can anyone please help me?
Thanks in advance for all your help
-----
Private Sub btnUpdateEdited_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnUpdateEdited.Click
If MessageBox.Show("Do you really want to SAVE it?", "Save"
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("Operation Cancelled!")
AddressBookDataSet.tblFirst.RejectChanges()
Else
Me.AddressBookDataSet.tblFirst.AcceptChanges()
Me.TblFirstTableAdapter.Update(Me.AddressBookDataSet.tblFirst)
Try
Me.Validate()
Me.TblFirstBindingSource.EndEdit()
Me.TblFirstTableAdapter.Update(Me.AddressBookDataSet.tblFirst)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
Exit Sub
End If
End Sub
I'm having a problem with my database and I just can't find the solution for
this.. I am just doing a database in VB NET linked with Access, everything is
fine until I want to edit/update the data that is already in the Database.
It just saves the information on VB NET but it does not pass the edited
information to Access... I dont know where my mistake is and I already
searched a lot...
Can anyone please help me?
Thanks in advance for all your help
-----
Private Sub btnUpdateEdited_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnUpdateEdited.Click
If MessageBox.Show("Do you really want to SAVE it?", "Save"
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("Operation Cancelled!")
AddressBookDataSet.tblFirst.RejectChanges()
Else
Me.AddressBookDataSet.tblFirst.AcceptChanges()
Me.TblFirstTableAdapter.Update(Me.AddressBookDataSet.tblFirst)
Try
Me.Validate()
Me.TblFirstBindingSource.EndEdit()
Me.TblFirstTableAdapter.Update(Me.AddressBookDataSet.tblFirst)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
Exit Sub
End If
End Sub