|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Changes not getting saved to data sourcechanges back to the data source. Adding new record is fine. Only edits and deletes don't work. Here's my code: Dim r As DataSet1.PeopleRow OleDbDataAdapter1.Fill(DataSet11) r = DataSet11.People.Rows(0) r.Name = "Kevin" r.AcceptChanges() Dim ret As Integer = OleDbDataAdapter1.Update(DataSet11) My DataAdapter and Dataset are strongly typed and they were created through VS 2008 data wizard. By the way, I'm using an MS Access 2003 database with a table called People. People Id : Number, primary key Name: String Please help as I'm really stuck. Thanks --- news://freenews.netfront.net/ - complaints: n***@netfront.net --- Am 23.04.2010 18:36, schrieb rarahim:
Show quoteHide quote > Hi. I'm kinda new with ADO .NET. I'm having trouble saving edit and delete Remove r.AcceptChanges(). The Update methods looks for records with row> changes back to the data source. Adding new record is fine. Only edits and > deletes don't work. > > Here's my code: > > Dim r As DataSet1.PeopleRow > > OleDbDataAdapter1.Fill(DataSet11) > > r = DataSet11.People.Rows(0) > > r.Name = "Kevin" > > r.AcceptChanges() > > Dim ret As Integer = OleDbDataAdapter1.Update(DataSet11) > > My DataAdapter and Dataset are strongly typed and they were created through > VS 2008 data wizard. By the way, I'm using an MS Access 2003 database with a > table called People. state modified, added and deleted. If you call AcceptChanges before, deleted records have been removed from the datatable, and the row state of the remaining rows is unchanged. Consequently the update method doesn#t find anything to do. -- Armin
return value, exit function
Add inner control event. send the class type as a parameter. simmulate real rowEnter on DataGridView object. Update command to update field signing certificate error... Sending messages between windows Setting Event Log Size setting Posting a form to webserver using vb.net ASP table background color |
|||||||||||||||||||||||