Cannot Edit Entry After Saving First TimeMay 27, 2010
When ever I add a new entry into the database, it will do it. When I click save, it will save it. When I go back to edit the entry after it was saved the first time, and I hit save again, I get a concurrency violation? It only does it when I add an entry. If I close the program out and restart it again I can save all day long as long as I don't add a new entry. First of all, dunno where the violation is coming from, but I only have a message box on my catch statement on the save button.
I have added it to the database using the following code 100 times and it has always worked:
My save code is:
Why after a million times of using this exact same code is it not working? It will save all day long no problem as long as I don't add a new entry. Here is my add
EmployeeInitialsTextBox.Text = lblUser.Text
Catch ex As Exception
MessageBox.Show("UNABLE TO ADD! " & ex.Message) End Try
The message box for the add code never shows so I can't see that is causing any trouble. I am using VS2010 and a local database, not SQL. I just tried doing it again, I added an entry, I saved it, I got a successful message. I then tried to change something and I got a concurrency violation when I clicked save again. I then tried to delete an entry and it successfully deleted it, but when I went to edit another entry and save I got the violation.