944,181 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 19090
  • VB.NET RSS
Sep 28th, 2006
0

TableAdapter Update Method

Expand Post »
Hi guys, I have got a button to update and save data changes.

When I did not make any changes, I will have a successful update.

When I made changes, it will be give me this errorWithout Try statements)


Update requires a valid UpdateCommand when passed DataRow collection with modified rows.

The below is my codings. Anyone have suggestions? Thanks.:eek:

If Me.Validate Then
Try
Me.CanDrinksBindingSource.EndEdit()
Me.CanDrinksTableAdapter.Update(Me.StockDataSet.CanDrinks) 'Update method
MessageBox.Show("Update Successful!")

Catch ex As Exception
MessageBox.Show("Update failed")
End Try
End If
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
LiBOC is offline Offline
73 posts
since Jul 2005
Sep 30th, 2006
0

Re: TableAdapter Update Method

What did you set the UpdateCommand property as?
Reputation Points: 53
Solved Threads: 6
Junior Poster in Training
Inanna is offline Offline
90 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC