TableAdapter Update Method

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2005
Posts: 73
Reputation: LiBOC is an unknown quantity at this point 
Solved Threads: 0
LiBOC's Avatar
LiBOC LiBOC is offline Offline
Junior Poster in Training

TableAdapter Update Method

 
0
  #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
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 90
Reputation: Inanna is on a distinguished road 
Solved Threads: 6
Inanna's Avatar
Inanna Inanna is offline Offline
Junior Poster in Training

Re: TableAdapter Update Method

 
0
  #2
Sep 30th, 2006
What did you set the UpdateCommand property as?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC