By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

Won't save the last Entry in Database in VB 2010

P: 1
i have a problem with saving last entry in the data base in Visual Basic 2010.

if i enter 3 items (for Example) the program will save the first two, the last one will not store it even when i press save button.

here the code i made for save button:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
  2.         Try
  3.             Me.Validate()
  4.             Me.CrimeTableBindingSource.EndEdit()
  5.             Me.TableAdapterManager.UpdateAll(Me.CrimeListDataSet)
  6.         Catch ex As Exception
  7.             MsgBox(ex.Message)
  8.         End Try
  9.  
  10.         NameTextBox.Enabled = False
  11.         NickNameTextBox.Enabled = False
  12.         CrimeTextBox.Enabled = False
  13.         NotesTextBox.Enabled = False
  14.  
  15.     End Sub
Dec 28 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.