HighTechTalks DotNet Forums  

Re: Update datarow in typed dataset

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss Re: Update datarow in typed dataset in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Cor Ligthert[MVP]
 
Posts: n/a

Default Re: Update datarow in typed dataset - 08-22-2007 , 12:17 AM






Carlos,

To explain what acceptchanges does.

It is probably one of the most confusing words Microsoft ever made for a
method. (We see your problem here thousands times).

"Acceptchanges" is needed when you don't update the datatable to the
database using a dataadapter, or update a copy of the datatable and than
have to set the changes as updated in the original datatable.

Standard are only rows updated by a dataadapter which changes the updated
rows to done and removes all the information about the previous state (It is
set with the changes in it as the new changes to not changed).

I am always currious what brainwave the team had who invented this word for
this. It was in Redmond, there drugs are not as free as here I understood,
so the change it was that, is low.

Cor

..


"C a r l o s A n t o n i o >" <carlvazpr?arrobażyahoo.com> schreef in
bericht news:%23w0nhyB5HHA.1204 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Quote:
Hello,

How can I update a datarow in a typed dataset? It seems i can't make it
to write the changes into the database. What am i doing wrong? Thanks in
advance.

Here's my code:

Private Sub save_changes(ByVal _infraction_id As System.Guid)

Dim o_adapter As New roswellDataSetTableAdapters.infractionsTableAdapte r

Dim o_data_table As roswellDataSet.infractionsDataTable

Dim o_row As roswellDataSet.infractionsRow



o_data_table = o_adapter.GetData

o_row = o_data_table.FindByinfraction_id(_infraction_id)



With o_row

.BeginEdit()

.ticket_number = "333"

.EndEdit()

.AcceptChanges()

End With



o_adapter.Update(o_data_table)

o_data_table.AcceptChanges()

End Sub




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.