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

Updating table data

P: 5
I am a novice so be patient with me. I started a simple form and dragged the datasource onto the form and VB created everything nicely including the navigation bar. The problem is that the save button has no code behind it to update the sql database. Using the code on the msdn site shows an error, so I modified it as follows. It shows no errors but fails when run.
Expand|Select|Wrap|Line Numbers
  1.         Try
  2.             Me.Validate()
  3.             Me.OTQ_CUST_UNITBindingSource.EndEdit()
  4.             Me.TableAdapterManager.UpdateAll(VM_Sandbox2DataSet)
  5.             MsgBox("Update successful")
  6.             OTQ_CUST_UNITBindingNavigatorSaveItem.Enabled = False
  7.         Catch ex As Exception
  8.             MsgBox("Update failed")
  9.         End Try
  10.  
Any insights would be appreciated.
Jan 20 '14 #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.