RSS Forums RSS
Please support our VB.NET advertiser: Programming Forums
Views: 9035 | Replies: 1
Reply
Join Date: Jul 2005
Location: South East Asia , Singapore
Posts: 53
Reputation: LiBOC is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
LiBOC's Avatar
LiBOC LiBOC is offline Offline
Junior Poster in Training

Help TableAdapter Update Method

  #1  
Sep 28th, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2006
Posts: 90
Reputation: Inanna is on a distinguished road 
Rep Power: 3
Solved Threads: 6
Inanna's Avatar
Inanna Inanna is offline Offline
Junior Poster in Training

Re: TableAdapter Update Method

  #2  
Sep 30th, 2006
What did you set the UpdateCommand property as?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:15 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC